Merge pull request #474 from LilyFirefly/renovate/codspeedhq-action-4.x #1742
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: Rust | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| permissions: {} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| PYTHONPATH: ${{ github.workspace }} | |
| # Cancel running jobs for the same workflow and branch. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["macos-latest", "ubuntu-latest", "windows-latest"] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| - name: Install dependencies | |
| run: uv sync | |
| env: | |
| UV_PROJECT_ENVIRONMENT: ${{ env.pythonLocation }} | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@e00d2c94cc0067b77737821097a62d91c0301baa # v1.21.1 | |
| - name: Install cargo-llvm-cov | |
| run: cargo binstall cargo-llvm-cov | |
| - name: Run tests | |
| run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| files: lcov.info | |
| fail_ci_if_error: true |