mirror of
https://codeberg.org/JasterV/event_bus.rs.git
synced 2026-04-26 18:10:02 +00:00
feat: move CI to woodpecker
This commit is contained in:
parent
5c883b62bf
commit
c47579a536
4 changed files with 41 additions and 108 deletions
12
.github/dependabot.yml
vendored
12
.github/dependabot.yml
vendored
|
|
@ -1,12 +0,0 @@
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "cargo"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
# Check for updates every Monday
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
49
.github/workflows/cd.yml
vendored
49
.github/workflows/cd.yml
vendored
|
|
@ -1,49 +0,0 @@
|
||||||
name: Release-plz
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
jobs:
|
|
||||||
# Release unpublished packages.
|
|
||||||
release-plz-release:
|
|
||||||
name: Release-plz release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- &checkout
|
|
||||||
name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
- &install-rust
|
|
||||||
name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Run release-plz
|
|
||||||
uses: release-plz/action@v0.5
|
|
||||||
with:
|
|
||||||
command: release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
||||||
# Create a PR with the new versions and changelog, preparing the next release.
|
|
||||||
release-plz-pr:
|
|
||||||
name: Release-plz PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
concurrency:
|
|
||||||
group: release-plz-${{ github.ref }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
steps:
|
|
||||||
- *checkout
|
|
||||||
- *install-rust
|
|
||||||
- name: Run release-plz
|
|
||||||
uses: release-plz/action@v0.5
|
|
||||||
with:
|
|
||||||
command: release-pr
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
||||||
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
|
|
@ -1,47 +0,0 @@
|
||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ci-${{ github.head_ref || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- run: rustup default 1.93.1
|
|
||||||
- run: rustup component add clippy rustfmt
|
|
||||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # ratchet:Swatinem/rust-cache@v2
|
|
||||||
- uses: taiki-e/install-action@cargo-make
|
|
||||||
- uses: taiki-e/install-action@cargo-deny
|
|
||||||
- run: cargo make -p ci fmt-check
|
|
||||||
- run: cargo make -p ci clippy
|
|
||||||
- run: cargo make -p ci deny-check
|
|
||||||
- run: cargo make -p ci docs
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- run: rustup default 1.93.1
|
|
||||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # ratchet:Swatinem/rust-cache@v2
|
|
||||||
- uses: taiki-e/install-action@cargo-make
|
|
||||||
- uses: taiki-e/install-action@cargo-nextest
|
|
||||||
- run: cargo make -p ci test
|
|
||||||
|
|
||||||
alls-green:
|
|
||||||
if: always()
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- lint
|
|
||||||
- test
|
|
||||||
steps:
|
|
||||||
- run: ${{ !contains(needs.*.result, 'failure') }}
|
|
||||||
41
.woodpecker/ci.yml
Normal file
41
.woodpecker/ci.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
when:
|
||||||
|
- event: [push, pull_request]
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
# Define common environment variables for all steps
|
||||||
|
variables:
|
||||||
|
- &rust_env
|
||||||
|
CARGO_HOME: ${CI_WORKSPACE}/.cargo
|
||||||
|
PATH: ${CI_WORKSPACE}/.cargo/bin:$PATH
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
steps:
|
||||||
|
setup:
|
||||||
|
image: rust:1.93.1
|
||||||
|
environment:
|
||||||
|
<<: *rust_env
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install -y coreutils
|
||||||
|
- rustup component add clippy rustfmt
|
||||||
|
# Install cargo-binstall into our local bin folder
|
||||||
|
- mkdir -p .cargo/bin
|
||||||
|
- curl -Lskj https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xz -C .cargo/bin
|
||||||
|
# Binstall will now use the CARGO_HOME we defined
|
||||||
|
- cargo binstall --no-confirm cargo-make cargo-deny cargo-nextest
|
||||||
|
|
||||||
|
lint:
|
||||||
|
image: rust:1.93.1
|
||||||
|
environment:
|
||||||
|
<<: *rust_env
|
||||||
|
commands:
|
||||||
|
- cargo make -p ci fmt-check
|
||||||
|
- cargo make -p ci clippy
|
||||||
|
- cargo make -p ci deny-check
|
||||||
|
- cargo make -p ci docs
|
||||||
|
|
||||||
|
test:
|
||||||
|
image: rust:1.93.1
|
||||||
|
environment:
|
||||||
|
<<: *rust_env
|
||||||
|
commands:
|
||||||
|
- cargo make -p ci test
|
||||||
Loading…
Reference in a new issue