ci cannot run on macos due to limited resources #21
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: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_LOG: trace | |
| RUST_BACKTRACE: full | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: # fetch all submodules | |
| submodules: "recursive" | |
| - name: Install latest nightly | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin | |
| ~/.cargo/.crates.toml | |
| ~/.cargo/.crates2.json | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Lint | |
| run: cargo clippy --all-targets | |
| - name: Prepare driver and browsers | |
| run: cargo test hello | |
| - name: Test | |
| run: cargo test --all-targets -- --nocapture | |
| - name: Coverage | |
| if: success() && matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' | |
| run: | | |
| cargo install cargo-tarpaulin | |
| cargo tarpaulin --out Xml --verbose --exclude-files scripts/ tests/ src/build.rs src/main.rs src/generated.rs | |
| - name: Upload to codecov.io | |
| if: success() && matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: cobertura.xml | |
| slug: sctg-development/playwright-rust | |
| token: ${{secrets.CODECOV_TOKEN}} |