Skip to content

adding workflow

adding workflow #1

Workflow file for this run

name: Run Nx Tests for V2
on:
push:
branches:
- v2
pull_request:
branches:
- v2
jobs:
nx-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18] # Adjust to the versions your project supports
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ matrix.node-version }}
- name: Install dependencies with Yarn
run: yarn install
- name: Run Nx Tests
run: yarn nx test