ci: PR will only run lint check
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 23s
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 23s
This commit is contained in:
parent
2a3f4f755c
commit
34ffac39cb
@ -1,5 +1,5 @@
|
||||
name: Build
|
||||
run-name: Building and testing DC
|
||||
run-name: Running Lint Check
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
@ -18,21 +18,4 @@ jobs:
|
||||
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
|
||||
- run: npm run lint:check
|
@ -6,6 +6,53 @@ on:
|
||||
- development
|
||||
|
||||
jobs:
|
||||
Build-production-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: |
|
||||
touch client/.npmrc
|
||||
echo '${{ secrets.NPMRC}}' > client/.npmrc
|
||||
|
||||
- name: Install Chrome for Angular tests
|
||||
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
|
||||
|
||||
- name: Write cypress credentials
|
||||
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
|
||||
shell: bash
|
||||
env:
|
||||
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Check audit
|
||||
# Audit should fail and stop the CI if critical vulnerability found
|
||||
run: |
|
||||
npm audit --audit-level=critical
|
||||
cd ./sas
|
||||
npm audit --audit-level=critical
|
||||
cd ./client
|
||||
npm audit --audit-level=critical
|
||||
|
||||
- name: Angular Tests
|
||||
run: |
|
||||
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
||||
|
||||
- name: Angular Production Build
|
||||
run: |
|
||||
npm run postinstall
|
||||
npm run build
|
||||
|
||||
Build-and-test-development:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@ -34,7 +81,9 @@ jobs:
|
||||
env:
|
||||
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
||||
|
||||
- run: npm ci
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# Install pm2 and prepare SASJS server
|
||||
- run: npm i -g pm2
|
||||
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
|
||||
@ -117,7 +166,9 @@ jobs:
|
||||
env:
|
||||
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
|
||||
|
||||
- run: npm ci
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# Install pm2 and prepare SASJS server
|
||||
- run: npm i -g pm2
|
||||
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
|
||||
|
Loading…
Reference in New Issue
Block a user