fix rust-analyzer #217
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: Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "memobj/**" | |
| - "tests/**" | |
| - ".github/workflows/tests.yml" | |
| - "*.lock" | |
| pull_request: | |
| paths: | |
| - "memobj/**" | |
| - "tests/**" | |
| - ".github/workflows/tests.yml" | |
| - "*.lock" | |
| jobs: | |
| test: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.11", "3.12", "3.13", "3.14" ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore cached test binaries | |
| id: restore-cache-test | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: tests/manual/test_inject/target | |
| key: ${{ runner.os }}-${{ hashFiles('tests/manual/test_inject/src/**') }} | |
| - name: Setup rust | |
| if: steps.restore-cache-test.outputs.cache-hit != 'true' | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Build test binaries | |
| if: steps.restore-cache-test.outputs.cache-hit != 'true' | |
| run: cargo build --release --manifest-path tests/manual/test_inject/Cargo.toml | |
| - name: Cache test binaries | |
| if: steps.restore-cache-test.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: tests/manual/test_inject/target | |
| key: ${{ runner.os }}-${{ hashFiles('tests/manual/test_inject/src/**') }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run tests | |
| run: uv run pytest |