This repository was archived by the owner on Sep 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
72 lines (56 loc) · 1.9 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
go-tests:
name: Code beautification, unit tests and code coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.15'
- run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Run go fmt and lint
run: |
make test_go_fmt
make test_go_lint
- name: Get test data
run: make download_test_data
- name: Run go test
run: make test_go_unit
e2e-tests:
name: End-to-end tests
runs-on: ubuntu-latest
env:
MEDCO_DB_NUMBER: 9 # the number of databases used in the profile that will be tested
MEDCO_DB_HOST: localhost
MEDCO_DB_PORT: 5432
MEDCO_DB_USER: postgres
MEDCO_DB_PASSWORD: postgres
MEDCO_DB_NAME: postgres
MEDCO_USER_USERNAME: test
MEDCO_USER_PASSWORD: test
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker images
run: make -C deployments/dev-local-3nodes build
- name: Get test data
run: make download_test_data
- name: Start deployment and wait for it to be ready
run: |
make -C deployments/dev-local-3nodes up-d
bash test/wait_for_startup.sh $MEDCO_DB_NUMBER $MEDCO_DB_HOST $MEDCO_DB_PORT $MEDCO_DB_USER $MEDCO_DB_PASSWORD $MEDCO_DB_NAME
- name: Run integration tests (depending on deployment)
run: make test_go_integration
- name: Run e2e queries before loading
run: bash test/test_cli_preloading.sh $MEDCO_USER_USERNAME $MEDCO_USER_PASSWORD
- name: Load data in deployment
run: make -C deployments/dev-local-3nodes load_test_data
- name: Run e2e queries after loading
run: bash test/test_cli_postloading.sh $MEDCO_USER_USERNAME $MEDCO_USER_PASSWORD