Skip to content

chore: github CI

chore: github CI #7

Workflow file for this run

name: 'Tests'
on:
push:
branches:
- main
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
actions: read
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
unit: ${{ steps.filter.outputs.unit }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: dorny/paths-filter@v3
id: filter
with:
filters: .github/filters.yaml
cache-and-install:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.1.0
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
build:
name: 'build (node: ${{ matrix.node }})'
needs: [cache-and-install]
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]
steps:
- name: Project build
shell: bash
run: pnpm run build:clean
unit_back:
if: needs.changes.outputs.backend == 'true'
name: 'unit_back (node: ${{ matrix.node }})'
needs: [ changes, build ]
runs-on: ubuntu-latest
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
strategy:
matrix:
node: [ 20, 22 ]
steps:
- name: Run tests
run: yarn nx affected --target=test:unit --nx-ignore-cycles