-
Notifications
You must be signed in to change notification settings - Fork 105
56 lines (56 loc) · 1.5 KB
/
web-app-demo.yaml
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
name: Web App Demo
env:
WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
OIDC_SERVICE_ACCOUNT: ${{ secrets.OIDC_SERVICE_ACCOUNT }}
on:
push:
branches:
- main
paths:
- "web-app-demo/**"
pull_request:
branches:
- main
paths:
- "web-app-demo/**"
permissions: read-all
jobs:
frontend-unit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web-app-demo/Frontend
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
- name: Install dependencies
run: npm install
- name: Install Angular CLI
run: npm install -g @angular/cli > /dev/null
- name: Run unit tests
run: ng test --watch=false --browsers=ChromeHeadless
backend-unit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web-app-demo/Backend
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Export Google Application Credentials
run: export GOOGLE_APPLICATION_CREDENTIALS="CREDENTIALS"
- name: Run unit tests
run: python api/helper_test.py