Updated CI #186
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, pull_request] | |
| jobs: | |
| lint: | |
| runs-on: debian-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup update --no-self-update stable | |
| - name: Run cargo fmt | |
| run: cargo fmt -- --check | |
| - name: Run cargo clippy | |
| run: cargo clippy -- -D warnings | |
| test: | |
| strategy: | |
| matrix: | |
| platform: [debian-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run tests | |
| run: cargo test | |
| coverage: | |
| runs-on: debian-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup update --no-self-update stable | |
| - name: Run cargo-tarpaulin | |
| uses: actions-rs/tarpaulin@v0.1 | |
| with: | |
| args: '--out Xml' | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Archive code coverage results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: code-coverage-report | |
| path: cobertura.xml |