-
Notifications
You must be signed in to change notification settings - Fork 8
79 lines (64 loc) · 2.04 KB
/
tests.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
name: MainTests
# Controls when the workflow will run
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
# Allows running this workflow manually
workflow_dispatch:
inputs:
test_live:
description: 'test build ("DEV"|"")'
required: false
default: ''
env:
PURELORABUILD: ${{ github.event.inputs.build }}
jobs:
test:
timeout-minutes: 45
runs-on: ubuntu-latest
# sequence of tasks that will be executed as part of the job
steps:
#Check out to the develop branch
- name: Checkout dev
uses: actions/checkout@v2
with:
fetch-depth: 0
# run docker
- name: Start containers
working-directory: ./master/
# run: yarn nx run docker
run: docker compose -f libs/docker/docker-compose.yml up -d
#Install node.js
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
#Install yarn
- name: Install yarn
run: npm install yarn -g
#Install required packages
- name: Install packages
working-directory: ./master/
run: yarn install --frozen-lockfile
# - name: Wait for containers startup
# run: sleep 2m
# shell: bash
#Run tests on the entire repository
- name: Test
working-directory: ./master/
run: |
yarn nx run-many --target=test --all --skip-nx-cache --parallel --coverage
yarn nx run-many --target=build --all --skip-nx-cacahe --parallel
yarn nx run-many --target=lint --all --skip-nx-cache --parallel
yarn nx run-many --target=e2e --all --skip-nx-cache --parallel --coverage
- name: Kill containers
working-directory: ./master/
if: always()
run: docker compose -f libs/docker/docker-compose.yml down
- name: Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./master/coverage/