-
Notifications
You must be signed in to change notification settings - Fork 31
89 lines (78 loc) · 2.04 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
85
86
87
88
89
name: Backend tests
on:
push:
branches: [master, next]
paths-ignore:
- "ui/**"
pull_request:
branches: [master, next]
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.10"
- name: Run darker
run: |
pip install flake8
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
search:
image: opensearchproject/opensearch:2.2.0
env:
node.name: search
bootstrap.memory_lock: true
OPENSEARCH_JAVA_OPTS: -Xms1024m -Xmx1024m
discovery.type: single-node
discovery.seed_hosts: search
DISABLE_SECURITY_PLUGIN: true
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libsasl2-dev python3-dev libldap2-dev libssl-dev libkrb5-dev
- name: Install dependencies
run: |
pip install .
- name: Run integration and unit tests
run: ./run-tests.sh --check-pytest
- name: Codecov Coverage
uses: codecov/codecov-action@v1
with:
files: coverage.xml