forked from OpenSlides/openslides-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (94 loc) · 3.14 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
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
117
118
119
120
121
122
123
124
name: Continuous Integration
on:
pull_request:
branches: [ master ]
env:
PYTHON_VERSION: 3.8.5
jobs:
build-production-image:
name: Build and test production docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create docker production image
run: docker build . --tag=openslides-backend
- name: Run docker production image
run: docker run --detach --publish 9002:9002 --publish 9003:9003 openslides-backend
- name: Sleep for some seconds
run: sleep 2
- name: Fire a test request to actions component
run: curl -I localhost:9002/health
- name: Fire a test request to presenter component
run: curl -I localhost:9003/health
build-and-test-dev-image:
name: Build and test development docker image with Docker Compose
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: dev/run-tests.sh
check-models-checksum:
name: Check the checksum of the models.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install requirements
run: pip install --requirement dev/requirements_development.txt
- name: Check checksum
run: make check-models
check-coding-style-black:
name: Check coding style with black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install requirements
run: pip install --requirement dev/requirements_development.txt
- name: Check black
run: black --check --diff openslides_backend/ tests/ cli/ --exclude tests/integration/old
check-coding-style-isort:
name: Check coding style with isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install requirements
run: pip install --requirement dev/requirements_development.txt
- name: Check isort
run: isort --check-only --diff openslides_backend/ tests/ cli/
check-coding-style-flake8:
name: Check coding style with flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install requirements
run: pip install --requirement dev/requirements_development.txt
- name: Check flake8
run: flake8 openslides_backend/ tests/ cli/
check-coding-style-mypy:
name: Check coding style with mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install requirements
run: pip install --requirement dev/requirements_development.txt
- name: Check mypy
run: mypy openslides_backend/ tests/ cli/