deps(repo): bump nrwl/nx-set-shas from 3 to 4 #435
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: Node.js CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x, 18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Update NPM | |
run: npm install -g npm@">=7" | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
# We need to make sure eslint-plugin is built even if not affected, as we always run linting, | |
# which requires it | |
- name: Build eslint-plugin | |
run: npx nx build eslint-plugin | |
# Our lint-staged.config.mjs also relies on @eternagame/lint-staged-utils so that needs to be built to lint | |
- name: Build lint-staged-utils | |
run: npx nx build lint-staged-utils | |
- name: Build | |
run: npx nx affected --target=build | |
- name: Lint core files | |
run: npm run lint-core | |
- name: Lint packages | |
run: npx nx affected --target=lint | |
- name: Nx integrity check | |
run: npx nx workspace-lint | |
- name: Unit tests | |
run: npx nx affected --target=test | |
- name: End to end tests | |
run: npx nx affected --target e2e |