-
Notifications
You must be signed in to change notification settings - Fork 47
82 lines (77 loc) · 2.24 KB
/
test.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Test
on:
push:
pull_request:
types: [reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: SFDO-Tooling-Ubuntu
steps:
- uses: actions/checkout@v3
- uses: ./.github/setup-docker-compose
with:
# By writing to the cache here subsequent jobs will get the updated
# image when they use setup-docker-compose
cache-to: type=gha,mode=max
omniout-token: ${{ secrets.OMNIOUT_TOKEN }}
lint:
name: Lint
needs: [build]
runs-on: SFDO-Tooling-Ubuntu
steps:
- uses: actions/checkout@v3
- uses: ./.github/setup-docker-compose
with:
omniout-token: ${{ secrets.OMNIOUT_TOKEN }}
- name: Lint
run: docker compose run --no-deps web yarn lint:nofix
frontend:
name: Frontend
needs: [build]
runs-on: SFDO-Tooling-Ubuntu
steps:
- uses: actions/checkout@v3
- uses: ./.github/setup-docker-compose
with:
omniout-token: ${{ secrets.OMNIOUT_TOKEN }}
- name: Test frontend
run: docker compose run --no-deps web yarn test:js:coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: frontend-coverage
path: |
coverage
backend:
name: Backend
needs: [build]
runs-on: SFDO-Tooling-Ubuntu
steps:
- uses: actions/checkout@v3
- uses: ./.github/setup-docker-compose
with:
omniout-token: ${{ secrets.OMNIOUT_TOKEN }}
- name: Test backend
# prettier-ignore
run: >
docker compose run
-e DB_ENCRYPTION_KEY=MMkDMBfYL0Xoz3Xu1ENs3AkdCZdJoks5PNlUBkK7KDc=
-e DJANGO_DEBUG=false
-e SECURE_SSL_REDIRECT=false
-e GITHUB_TOKEN="sample token"
-e SFDX_CLIENT_SECRET="sample secret"
-e SFDX_CLIENT_CALLBACK_URL="sample callback"
-e SFDX_CLIENT_ID="sample id"
-e SFDX_HUB_KEY="sample key"
web yarn test:py
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: backend-coverage
path: |
.coverage
coverage.xml