-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (51 loc) · 1.6 KB
/
continuous-integration.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
name: CI
on:
pull_request:
branches: [main]
jobs:
build-and-test-prod-image:
name: Build and test production image
runs-on: ubuntu-22.04
defaults:
run:
working-directory: .github/startup-test
steps:
- uses: actions/checkout@v2
- name: Create secrets
run: |
mkdir secrets
echo -n "auth-dev-cookie-key" > secrets/auth_cookie_key
echo -n "auth-dev-token-key" > secrets/auth_token_key
echo -n "openslides" > secrets/internal_auth_password
echo -n "openslides" > secrets/postgres_password
- name: Build docker prod image
run: make -C ../.. build-prod
- name: Run prod image
run: docker-compose up -d
- name: Wait for auth-service
run: docker-compose exec -T auth ./wait-for.sh auth:9004
- name: Test connection
run: curl -I localhost:9004/system/auth
- name: Stop prod containers
run: docker-compose down --volumes
build-and-test-dev-image:
name: Build and test development image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Run tests
run: make run-test
- name: Check prettify
run: make run-check-prettify
- name: Check lint
run: make run-check-lint
- name: Check black
run: make run-check-black
- name: Check isort
run: make run-check-isort
- name: Check flake8
run: make run-check-flake8
- name: Check mypy
run: make run-check-mypy
- name: Stop dev containers
run: make stop-dev