-
Notifications
You must be signed in to change notification settings - Fork 21
98 lines (90 loc) · 2.59 KB
/
bookkeeping.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
name: Bookkeeping
on:
pull_request:
push:
branches:
- main
jobs:
parallel_tests:
name: ${{ matrix.test_type }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_type: [unit,
api,
lhc-periods,
lhc-fills,
logs,
envs,
runs,
tags,
flps,
home,
about,
eos-report,
data-passes,
simulation-passes,
qc-flag-types,
qc-flags]
steps:
- uses: actions/checkout@v4
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Create Coverage Directory
run: mkdir -p ${{ github.workspace }}/coverage
- name: Set COMPOSE_PROJECT_NAME
run: echo "COMPOSE_PROJECT_NAME=${{ matrix.test_type }}_app" >> $GITHUB_ENV
- name: Build and Start Test Database
run: |
docker compose \
-f docker-compose.test-parallel-base.yml \
-f docker-compose.test-parallel-ci.yml \
up --detach test_db
env:
TEST_TYPE: ${{ matrix.test_type }}
- name: Build Test Container
run: |
docker compose \
-f docker-compose.test-parallel-base.yml \
-f docker-compose.test-parallel-ci.yml \
build test_app
env:
TEST_TYPE: ${{ matrix.test_type }}
- name: Run Tests
run: |
docker compose \
-f docker-compose.test-parallel-base.yml \
-f docker-compose.test-parallel-ci.yml \
run test_app
env:
TEST_TYPE: ${{ matrix.test_type }}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage/lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
TEST_TYPE: ${{ matrix.test_type }}
- name: Clean Up
run: |
docker compose \
-f docker-compose.test-parallel-base.yml \
-f docker-compose.test-parallel-ci.yml \
down
env:
TEST_TYPE: ${{ matrix.test_type }}
linter:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Installing dependencies
run: npm ci
- name: Running linter
run: npm run lint