This repository has been archived by the owner on Jul 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.65 KB
/
bankingapp-ui.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: BankingApp-UI CI
on:
workflow_dispatch:
push:
branches: [ "main", "feature/*" ]
paths:
- "bankingapp-ui/**"
pull_request:
branches: [ "main" ]
paths:
- "bankingapp-ui/**"
jobs:
build:
defaults:
run:
working-directory: ./bankingapp-ui
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v3
- name: Setup Chrome
uses: browser-actions/setup-chrome@v1
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: ./bankingapp-ui/package-lock.json
registry-url: https://npm.pkg.github.com/
- name: Install Dependencies
run: |
npm install -g @angular/cli
npm ci
- name: Run tests
run: ng test --code-coverage --watch=false
- name: Linting Errors
run: |
npm run lint
echo "# Test Coverage" >> $GITHUB_STEP_SUMMARY
echo " \`\`\` " >> $GITHUB_STEP_SUMMARY
cat "./coverage/bankingapp-ui/coverage.txt" >> $GITHUB_STEP_SUMMARY
echo " \`\`\` " >> $GITHUB_STEP_SUMMARY
- name: Run Cypress Tests
run: |
ng serve --configuration development &
until $(curl --output /dev/null --silent --head --fail http://localhost:4200); do
echo "Starting Angular application"
sleep 5
done
npm run cypress:run
- name: Grype security check
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
grype dir:./node_modules --config ../.grype.yml