Require ecCodes parity in CI #101
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 | |
| - master | |
| tags: | |
| - "v*" | |
| - "grib-reader-v*" | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| jobs: | |
| checks: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup toolchain install 1.91.0 --profile minimal --component rustfmt,clippy --no-self-update | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets --all-features --locked -- -D warnings | |
| - name: Verify corpus fixtures are up to date | |
| run: | | |
| cargo run -p grib-reader --example sync_corpus --locked | |
| git diff --exit-code | |
| - name: Run tests with all features | |
| run: cargo test --all-features --locked | |
| - name: Run tests with no default features | |
| run: cargo test --no-default-features --locked | |
| - name: Check fuzz targets | |
| run: cargo check --manifest-path grib-reader/fuzz/Cargo.toml --bins --locked | |
| - name: Lint fuzz targets | |
| run: cargo clippy --manifest-path grib-reader/fuzz/Cargo.toml --bins --locked -- -D warnings | |
| - name: Verify crate packaging | |
| run: cargo package --workspace --locked | |
| - name: Verify publish dry run | |
| run: cargo publish --workspace --dry-run --locked |