Skip to content

build: bump gulp and npm audit fix #455

build: bump gulp and npm audit fix

build: bump gulp and npm audit fix #455

name: 'Continuous Integration'
'on':
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
cancelCurrentRuns:
name: 'Cancel in-progress Workflow runs'
runs-on: 'ubuntu-22.04'
steps:
- name: 'Cancel in-progress Workflow runs'
uses: 'styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa'
with:
access_token: '${{ secrets.GITHUB_TOKEN }}'
uiTest:
name: 'UI Tests'
runs-on: 'ubuntu-22.04'
steps:
- name: 'Mask any potential PII'
run: "echo \"::add-mask::${{ secrets.PHONE_NUMBER }}\"\necho \"::add-mask::${{ secrets.APPLE_ID }}\""
- name: 'Checkout the current branch'
uses: 'actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11'
with:
fetch-depth: 0
- name: 'Setup Node.js - 20'
uses: 'actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8'
with:
node-version: '>=20'
cache: 'npm'
- uses: 'actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9'
name: 'Cache Node Modules'
with:
path: '~/.npm'
key: '${{ runner.os}}-node-${{ hashFiles(''**/package-lock.json'') }}'
restore-keys: '${{ runner.os }}-node-'
- name: 'Install Gulp'
run: 'npm install -g [email protected]'
- name: 'Install Node modules'
run: 'npm ci'
- name: 'Set virtual display if Ubuntu'
if: 'runner.os == ''Linux'''
run: 'Xvfb :99 &'
- name: 'Setup Playwright dependencies'
run: 'npx playwright install --with-deps'
- name: 'Run UI tests'
run: 'gulp uiTests --max-old-space-size=8192'
env:
DISPLAY: ':99'
- name: 'Upload build artifacts if failed'
if: 'failure()'
uses: 'actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba'
with:
path: "apps/**/dist/\ndist/"
needs:
- 'cancelCurrentRuns'
unitTest:
name: 'Unit Tests'
runs-on: 'ubuntu-22.04'
steps:
- name: 'Mask any potential PII'
run: "echo \"::add-mask::${{ secrets.PHONE_NUMBER }}\"\necho \"::add-mask::${{ secrets.APPLE_ID }}\""
- name: 'Checkout the current branch'
uses: 'actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11'
with:
fetch-depth: 0
- name: 'Setup Node.js - 20'
uses: 'actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8'
with:
node-version: '>=20'
cache: 'npm'
- uses: 'actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9'
name: 'Cache Node Modules'
with:
path: '~/.npm'
key: '${{ runner.os}}-node-${{ hashFiles(''**/package-lock.json'') }}'
restore-keys: '${{ runner.os }}-node-'
- name: 'Install Gulp'
run: 'npm install -g [email protected]'
- name: 'Install Node modules'
run: 'npm ci'
- name: 'Set virtual display if Ubuntu'
if: 'runner.os == ''Linux'''
run: 'Xvfb :99 &'
- name: 'Setup Playwright dependencies'
run: 'npx playwright install --with-deps'
- name: 'Run unit tests'
run: 'gulp unitTests --max-old-space-size=8192'
needs:
- 'cancelCurrentRuns'
lint:
name: 'Lint'
runs-on: 'ubuntu-22.04'
needs:
- 'cancelCurrentRuns'
steps:
- name: 'Mask any potential PII'
run: "echo \"::add-mask::${{ secrets.PHONE_NUMBER }}\"\necho \"::add-mask::${{ secrets.APPLE_ID }}\""
- name: 'Checkout the current branch'
uses: 'actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11'
with:
fetch-depth: 0
- name: 'Setup Node.js - 20'
uses: 'actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8'
with:
node-version: '>=20'
cache: 'npm'
- uses: 'actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9'
name: 'Cache Node Modules'
with:
path: '~/.npm'
key: '${{ runner.os}}-node-${{ hashFiles(''**/package-lock.json'') }}'
restore-keys: '${{ runner.os }}-node-'
- name: 'Install Gulp'
run: 'npm install -g [email protected]'
- name: 'Install Node modules'
run: 'npm ci'
- name: 'Run Lint'
run: 'npm run lint'