From 2be9ae8eff18214f528562f8a16b3dc598504f1f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 21 Sep 2024 22:07:04 +0100 Subject: [PATCH] build: add test and build checks to workflows --- .forgejo/workflows/push-next.yml | 39 +++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index cc8498c..195deef 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -4,16 +4,53 @@ on: push: branches: - next + pull_request: + branches: + - main workflow_dispatch: +env: + CARGO_TERM_COLOR: always + jobs: - test: + checks: 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 + + - 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