Skip to content

Update test.yaml

Update test.yaml #22

Workflow file for this run

name: Affected Build and Test
on:
push:
branches:
- main
pull_request:
jobs:
affected:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: latest
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install
- uses: nrwl/nx-set-shas@v3
- if: github.event_name == 'pull_request' && github.base_ref == 'main'
run: git branch --track main origin/main
- run: pnpm nx affected -t lint,test,build --parallel=3