Fix brave tracking #3
Workflow file for this run
This file contains 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
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# cancel previous runs on the same PR | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
name: ⛷ PR tests | |
env: | |
CI: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-and-test: | |
name: 🏗 Build Project & 🧪 Run Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
# We need to fetch all branches and commits so that Nx affected has a base to compare against. | |
fetch-depth: 0 | |
- uses: nrwl/nx-set-shas@v3 | |
- uses: pnpm/[email protected] | |
- name: Setup Node.js | |
id: setup-node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: 💾 Cache Nx cache | |
id: package-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
nx-cache | |
# Cache will be updated at every run: https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache | |
key: ${{ runner.os }}-nx-cache-${{ steps.setup-node.outputs.node-version }}-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-nx-cache-${{ steps.setup-node.outputs.node-version }}- | |
${{ runner.os }}-nx-cache- | |
- name: '🏗 Package' | |
run: pnpm nx affected --target=package --parallel=2 | |
- name: '🧪 Run tests' | |
run: pnpm nx affected --targets=test-linter,test-type,test-unit,test-circular --parallel=2 |