Add integration tests for chainrules-core re-exports (#2) #6
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: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| fmt: | |
| name: rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo fmt --all --check | |
| nextest: | |
| name: nextest (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@nextest | |
| - name: Run tests with nextest | |
| run: cargo nextest run --workspace --release --no-fail-fast | |
| - name: Run doctests | |
| run: cargo test --doc --workspace --release | |
| coverage: | |
| name: coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@nextest | |
| - uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate coverage JSON | |
| run: cargo llvm-cov nextest --workspace --release --json --output-path coverage.json | |
| - name: Check per-file thresholds | |
| run: python3 scripts/check-coverage.py coverage.json | |
| docs-site: | |
| name: docs-site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Install pandoc and graphviz | |
| run: sudo apt-get update && sudo apt-get install -y pandoc graphviz | |
| - name: Build docs site | |
| run: bash scripts/build_docs_site.sh |