-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.18 KB
/
ci-cd.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
name: CI / CD
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- run: cd front; npm install;npm install axios; cd ..
- run: cd front; npm run build; cd ..
- run: npm install
- run: npx playwright install --with-deps
- run: npm test
- run: npm run coverage
- run: npm run report-test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: '${{ secrets.CODECOV_TOKEN }}'
slug: gti-sos/SOS2324-14
deploy:
needs: [test]
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v2
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY_JSON }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Use gcloud CLI'
run: 'gcloud info'
- run: cd front; npm install; npm install axios; cd ..
- run: cd front; npm run build; cd ..
- name: Deploy
run: gcloud app deploy