ci: enforce Conventional Commits and modernize all workflows #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| # Cancel superseded PR runs; never cancel a main run mid-flight. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Integration tests | |
| runs-on: ubuntu-latest | |
| env: | |
| RUN_INTEGRATION_TESTS: "1" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - name: Install IRMA server | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/irma-bin" | |
| echo "$RUNNER_TEMP/irma-bin" >> "$GITHUB_PATH" | |
| curl -fsSL https://github.com/privacybydesign/irmago/releases/download/v0.8.0/irma-master-linux-amd64 \ | |
| -o "$RUNNER_TEMP/irma-bin/irma" | |
| chmod +x "$RUNNER_TEMP/irma-bin/irma" | |
| - name: Set up IRMA configuration | |
| run: | | |
| mkdir -p temp_testing/client temp_testing/irma_configuration | |
| irma scheme download temp_testing/irma_configuration | |
| - name: Build test client emulator | |
| working-directory: test_tools/client_emulator | |
| run: go build | |
| - name: Run tests | |
| run: cargo test --all-features |