Update master branch for nx #602
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
name: NodeJS Continuous Health Check | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- 'documentation/**' | |
- 'README.md' | |
- 'errors.log' | |
pull_request: | |
branches: [master] | |
paths-ignore: | |
- 'documentation/**' | |
- 'README.md' | |
- 'errors.log' | |
jobs: | |
node_ci: | |
runs-on: ${{ matrix.os }} | |
env: | |
NODE_CACHE: 'npm' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [18] | |
steps: | |
- name: Check out repository | |
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} | |
uses: actions/checkout@v3 | |
with: | |
# We need to fetch all branches and commits so that Nx affected has a base to compare against. | |
fetch-depth: 0 | |
- name: Setup node env | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: false | |
registry-url: https://registry.npmjs.org | |
# cache: ${{ env.NODE_CACHE }} | |
# cache-dependency-path: ${{ matrix.dir }}/package-lock.json | |
- uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: 'master' | |
- name: Install deps | |
run: npm ci --prefer-offline --no-audit | |
- name: Lint affected | |
run: npm run lint | |
- name: Test affected | |
run: npx nx affected -t test | |
- name: Build affected | |
run: npm run build |