38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Build
|
|
run-name: Building and testing DC
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
Build-and-ng-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Write .npmrc file
|
|
run: echo "$NPMRC" > client/.npmrc
|
|
shell: bash
|
|
env:
|
|
NPMRC: ${{ secrets.NPMRC}}
|
|
|
|
- run: apt-get update
|
|
- run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
- run: apt install -y ./google-chrome*.deb;
|
|
- run: export CHROME_BIN=/usr/bin/google-chrome
|
|
- run: npm run lint:check
|
|
# Install dependencies~
|
|
- run: npm ci
|
|
# Audit should fail and stop the CI if critical vulnerability found
|
|
- run: npm audit --audit-level=critical
|
|
- run: |
|
|
cd ./sas
|
|
npm audit --audit-level=critical
|
|
- run: |
|
|
cd ./client
|
|
npm audit --audit-level=critical
|
|
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
|
npm run postinstall
|
|
npm run build |