Update Node.js to v18.20.3 #593
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: CI | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
env: | |
node-version: '18.x' | |
jobs: | |
precheck: | |
name: Check jobs to run | |
runs-on: ubuntu-22.04 | |
outputs: | |
affected-main: ${{ steps.affected.outputs.main }} | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: yarn | |
cache-dependency-path: '**/yarn.lock' | |
- name: Install deps | |
run: yarn install --prefer-offline | |
- name: Check affected apps | |
id: affected | |
run: | | |
main_affected=`./ops/bin/check-affected.sh apps main origin/master` | |
echo "::set-output name=main::$main_affected" | |
main: | |
name: Main app CI | |
runs-on: ubuntu-22.04 | |
needs: precheck | |
if: ${{ needs.precheck.outputs.affected-main == 'true' }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: yarn | |
cache-dependency-path: '**/yarn.lock' | |
- name: Install deps | |
run: yarn install --prefer-offline | |
- name: Codegen main-prisma | |
run: yarn nx codegen main-prisma | |
env: | |
PRISMA_BINARY_TARGET: '["linux-musl"]' | |
- name: Lint | |
run: yarn nx lint main | |
- name: Build | |
run: yarn nx build main | |
- name: Test - Unit | |
run: yarn nx test main | |
- name: Test - e2e - Setup | |
run: yarn nx run main-e2e:setup:prod | |
- name: Test - e2e - Run | |
id: test-main-e2e-run | |
run: yarn nx run main-e2e:run:docker | |
- name: Upload failed e2e artifacts | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: main-e2e-cypress-artifacts | |
path: dist/cypress | |
- name: Test - e2e - Teardown | |
if: always() | |
run: yarn nx run main-e2e:teardown |