Cleanup test script #44
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: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install prerequisites | |
| run: sudo apt-get update && sudo apt-get install --no-install-recommends --yes jq libxml2-utils cargo rustfmt | |
| - name: Run fmt | |
| run: cargo fmt --all -- --check | |
| - name: Check file formatting | |
| run: | | |
| bash format.sh | |
| git diff --exit-code | |
| build-native: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install prerequisites | |
| run: sudo apt-get update && sudo apt-get install --no-install-recommends --yes cargo rust-clippy rustfmt | |
| - name: Run build | |
| run: cargo build | |
| - name: Run tests | |
| run: cargo test | |
| - name: Run clippy | |
| run: cargo clippy --all-targets | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build docker container | |
| run: docker build -f Dockerfile . | |
| build-nix: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build nix package | |
| run: docker build -f Dockerfile.nixbuild . |