-
Notifications
You must be signed in to change notification settings - Fork 30
84 lines (73 loc) · 1.94 KB
/
web-api.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
name: Backend tests
on:
push:
branches: [ master, ant ]
paths-ignore:
- 'ui/**'
pull_request:
branches: [ master, ant, faser ]
paths-ignore:
- 'ui/**'
jobs:
lint-python-changes:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
- name: Run darker
run: |
pip install darker[isort]
darker . --check -i -L flake8
python-tests:
runs-on: ubuntu-20.04
services:
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgres:9.6
env:
POSTGRES_USER: cap
POSTGRES_PASSWORD: cap
POSTGRES_DB: cap
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
elasticsearchd:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.4
env:
bootstrap.memory_lock: true
ES_JAVA_OPTS: -Xms1024m -Xmx1024m
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9200:9200
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6.9
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev libkrb5-dev
- name: Install dependencies
run: |
pip install --upgrade pip==20.2.4
pip install -r requirements.txt
pip install -e .[all,docs,tests,ldap]
pip install -r requirements-local-forks.txt
- name: Run integration and unit tests
run: ./run-tests.sh --check-pytest
- name: Codecov Coverage
uses: codecov/codecov-action@v1
with:
files: coverage.xml