ci: use rust-toolchain.toml for toolchain and component management #4
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 | |
| - "codex/**" | |
| pull_request: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| verify: | |
| name: Verify (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup show | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| - name: Check the workspace | |
| run: cargo check --all-targets --all-features | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run tests | |
| run: cargo test | |
| - name: Check packaging | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo package --allow-dirty | |
| - name: Dry-run publish | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo publish --dry-run |