-
Notifications
You must be signed in to change notification settings - Fork 40
153 lines (123 loc) · 4.56 KB
/
automaticTesting.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Automatic Testing
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
checks: write
contents: write
jobs:
run-backend-tests:
name: Run Backend tests
runs-on: ubuntu-24.04
services:
rabbitmq:
image: rabbitmq:3.10.5-management
ports:
- "5672:5672"
- "15671:15671"
- "15672:15672"
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: backend/package.json
cache: 'yarn'
cache-dependency-path: backend/yarn.lock
- name: Check out node_modules cache if available
uses: actions/cache@v3
with:
path: backend/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('backend/yarn.lock') }}
- name: Install Node.js dependencies
run: cd backend ; yarn install --network-timeout 100000 --frozen-lockfile --immutable --immutable-cache --non-interactive
- name: Run Backend test:v5
run: cd backend ; yarn test:v5
run-backend-lint:
name: Run Backend lint
runs-on: ubuntu-24.04
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: backend/package.json
cache: 'yarn'
cache-dependency-path: backend/yarn.lock
- name: Check out node_modules cache if available
uses: actions/cache@v3
with:
path: backend/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('backend/yarn.lock') }}
- name: Install Node.js dependencies
run: cd backend ; yarn install --network-timeout 100000 --immutable --immutable-cache --check-cache
- name: Run Backend lint
run: cd backend ; yarn lint
run-frontend-tests:
name: Run Frontend tests
runs-on: ubuntu-24.04
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: frontend/package.json
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
- name: Check out node_modules cache if available
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('frontend/yarn.lock') }}
- name: Install Node.js dependencies
run: cd frontend ; yarn install --network-timeout 100000 --frozen-lockfile --immutable --immutable-cache --non-interactive
- name: Run Frontend yarn test
run: cd frontend ; yarn test
- name: Run Frontend yarn docs
run: cd frontend ; yarn docs
run-frontend-lint:
name: Run Frontend lint
runs-on: ubuntu-24.04
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: frontend/package.json
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
- name: Check out node_modules cache if available
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('frontend/yarn.lock') }}
- name: Install Node.js dependencies
run: cd frontend ; yarn install --network-timeout 100000 --immutable --immutable-cache --check-cache
- name: Run Frontend lint
run: cd frontend ; yarn lint
- name: Run Frontend yarn build:test
run: cd frontend ; yarn build:test
# make sure we're not merging DevOps changes
devops-sanity-check:
name: Ensure that custom settings are not being merged
runs-on: ubuntu-24.04
steps:
- name: Checkout .azure/build-and-deploy.yaml
uses: Bhacaz/checkout-files@v2
with:
files: .azure/build-and-deploy.yaml
branch: ${{ github.head_ref || github.ref_name }}
- name: Check to see if customHelmOverride has any APP settings
id: customHelmOverride
uses: mikefarah/yq@master
with:
cmd: if ( $(yq eval '.variables.customHelmOverride | ( contains("APP_") )' .azure/build-and-deploy.yaml) === "true" ); then echo $(yq eval '.variables.customHelmOverride' .azure/build-and-deploy.yaml); exit 1; fi