From cd27b983a931f487279ea3194579137b4ca9df28 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 25 Sep 2024 08:45:14 +0100 Subject: [PATCH] build: add forgejo workflow tests --- .forgejo/workflows/push-main.yml | 35 +++++++++++++++++++++ .forgejo/workflows/push-next.yml | 52 ++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 .forgejo/workflows/push-main.yml create mode 100644 .forgejo/workflows/push-next.yml diff --git a/.forgejo/workflows/push-main.yml b/.forgejo/workflows/push-main.yml new file mode 100644 index 0000000..b85b5d9 --- /dev/null +++ b/.forgejo/workflows/push-main.yml @@ -0,0 +1,35 @@ +name: Release Please + +permissions: + pull-requests: write + contents: write + +on: + push: + branches: + - main + +env: + CARGO_TERM_COLOR: always + +jobs: + release-plz: + name: Release-plz + runs-on: docker + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run release-plz release-pr + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }} + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + - name: Run release-plz release + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }} + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml new file mode 100644 index 0000000..5f4209a --- /dev/null +++ b/.forgejo/workflows/push-next.yml @@ -0,0 +1,52 @@ +name: Rust + +on: + push: + branches: ["next"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: docker + + strategy: + matrix: + toolchain: + - name: stable + - name: nightly + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check TODOs + uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.1.0 + + - name: Machete + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: ${{ matrix.toolchain.name }} cargo machete + + - name: Format + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: ${{ matrix.toolchain.name }} cargo fmt --all -- --check + + - name: Clippy + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset clippy + + - name: Build + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset build + + - name: Test + uses: https://git.kemitix.net/kemitix/rust@v2.1.0 + with: + args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset test