-
Notifications
You must be signed in to change notification settings - Fork 3
116 lines (104 loc) · 3.08 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
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
name: Tests
on:
push:
branches:
- master
- canary
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
headless_lms:
runs-on: ubuntu-latest
container: eu.gcr.io/moocfi-public/project-331-headless-lms-dev-base:latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Cargo clippy
run: cargo clippy --manifest-path services/headless-lms/Cargo.toml -- -D warnings
- name: Build
run: cargo build --verbose
working-directory: ./services/headless-lms
- name: Set up unit test database
run: sqlx database setup
working-directory: ./services/headless-lms
env:
DATABASE_URL: postgres://postgres:postgres@postgres/headless_lms_test
- name: Set up integration test database
run: sqlx database setup
working-directory: ./services/headless-lms
env:
DATABASE_URL: postgres://postgres:postgres@postgres/headless_lms_integration
- name: Run tests
run: cargo test --verbose
working-directory: ./services/headless-lms
env:
DATABASE_URL: postgres://postgres:postgres@postgres/headless_lms_test
DATABASE_URL_TEST: postgres://postgres:postgres@postgres/headless_lms_integration
REDIS_URL: redis://redis:6379
cms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm ci for the root of the repo
run: npm ci
- name: npm ci
run: npm ci
working-directory: ./services/cms
- name: Run tests
run: npm run test
working-directory: ./services/cms
shared-module-common:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm ci for the root of the repo
run: npm ci
- name: npm ci
run: npm ci
working-directory: ./shared-module/packages/common
- name: Run tests
run: npm run test
working-directory: ./shared-module/packages/common
quizzes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm ci for the root of the repo
run: npm ci
- name: npm ci
run: npm ci
working-directory: ./services/quizzes
- name: Run tests
run: npm run test
working-directory: ./services/quizzes
course-material:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm ci for the root of the repo
run: npm ci
- name: npm ci
run: npm ci
working-directory: ./services/course-material
- name: Run tests
run: npm run test
working-directory: ./services/course-material