Skip to content

chore: fix and cleanup deploy pipeline + add manual trigger #23

chore: fix and cleanup deploy pipeline + add manual trigger

chore: fix and cleanup deploy pipeline + add manual trigger #23

name: Run Unit Tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
run_unit:
name: Run Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [20.x]
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: NPM cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM
uses: actions/cache@v3
env:
cache-name: npm
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node-version }}-${{ env.cache-name }}-
- run: npm ci
- run: npm run affected:test -- --base=origin/develop --parallel=5