-
Notifications
You must be signed in to change notification settings - Fork 46
50 lines (38 loc) · 1.21 KB
/
github-ci.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
name: Run Tests
on: [pull_request]
jobs:
test_lints:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v2
- name: Load node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('package-lock.json') }}
- name: Install node_modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install -f
- name: Test SCSS
run: npm run test:scss
- name: Test JS
run: npm run test:js
test_cypress:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v2
- name: Run backend container
run: docker-compose -f "docker-compose.test.yml" up -d --build
- name: Create config.json
run: echo $TEST_CONFIG_JSON > src/config.json
env:
TEST_CONFIG_JSON: '{ "apiURL": "http://localhost:1337", "APP_ENV": "prod" , "SSO": false}'
- name: Test Cypress
uses: cypress-io/github-action@v2
with:
install-command: npm i -f
start: npm start
wait-on: 'http://localhost:3000'