Merge pull request #275 from step-security/fix/vulnerabilities #683
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: target-dir | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: {} | |
| jobs: | |
| target-dir: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ${{ github.actor == 'dependabot[bot]' && fromJSON('["ubuntu-latest"]') || fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]') }} | |
| name: Test custom target-dir on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - run: rustup toolchain install stable --profile minimal --no-self-update | |
| # the `workspaces` option has the format `$workspace -> $target-dir` | |
| # and the `$target-dir` is relative to the `$workspace`. | |
| - uses: ./ | |
| with: | |
| workspaces: tests -> ../custom-target-dir | |
| - run: cargo test --manifest-path tests/Cargo.toml --target-dir custom-target-dir |