Merge pull request #720 from google:dependabot/github_actions/github/… #2640
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: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| permissions: read-all | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| clippy: | |
| runs-on: ubuntu-latest | |
| name: clippy / ${{ matrix.toolchain }} | |
| permissions: | |
| contents: read | |
| checks: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: [stable, beta] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| components: clippy | |
| - name: cargo clippy | |
| uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # v1.0.7 | |
| with: | |
| args: --all-targets --all-features | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| test-latest-deps: | |
| runs-on: ubuntu-latest | |
| name: test (latest deps) / ubuntu / ${{ matrix.toolchain }} | |
| strategy: | |
| matrix: | |
| toolchain: [stable, nightly, beta] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: cargo update | |
| run: cargo update | |
| - name: cargo test --locked | |
| run: cargo test --locked --all-features | |
| test: | |
| runs-on: ubuntu-latest | |
| name: test / ubuntu / ${{ matrix.toolchain }} | |
| strategy: | |
| matrix: | |
| toolchain: [stable, nightly, beta] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: cargo test --locked | |
| run: cargo test --locked --all-features | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: lint / ubuntu | |
| strategy: | |
| matrix: | |
| toolchain: [nightly] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| components: rustfmt | |
| - name: cargo fmt --check | |
| run: cargo fmt --check | |
| test-no-default-features: | |
| runs-on: ubuntu-latest | |
| name: test (no default features) / ubuntu / ${{ matrix.toolchain }} | |
| strategy: | |
| matrix: | |
| toolchain: [stable, 1.85.0] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: cargo test --locked | |
| run: cargo test --locked --no-default-features | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| name: integration-test / ubuntu / ${{ matrix.toolchain }} | |
| strategy: | |
| matrix: | |
| toolchain: [stable, 1.85.0, nightly, beta] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: run_integration_tests.sh | |
| run: /bin/bash ./run_integration_tests.sh | |
| integration-test-latest-deps: | |
| runs-on: ubuntu-latest | |
| name: integration-test (latest deps) / ubuntu / ${{ matrix.toolchain }} | |
| strategy: | |
| matrix: | |
| toolchain: [stable, nightly, beta] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: cargo update | |
| run: cargo update | |
| - name: run_integration_tests.sh | |
| run: /bin/bash ./run_integration_tests.sh | |
| doc: | |
| runs-on: ubuntu-latest | |
| name: doc / nightly | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| submodules: true | |
| - name: Install nightly | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: nightly | |
| - name: cargo doc | |
| run: cargo doc --no-deps --all-features | |
| env: | |
| RUSTDOCFLAGS: -D warnings |