-
Notifications
You must be signed in to change notification settings - Fork 5
executable file
·78 lines (70 loc) · 2.1 KB
/
main_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
73
74
75
76
77
78
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: # This configuration does not affect the page_build event above
- created
jobs:
test:
runs-on: ubuntu-latest
environment: CI
services:
hapi:
image: "hapiproject/hapi:latest"
env:
hapi.fhir.default_encoding: json
hapi.fhir.: json
hapi.fhir.server_address: "http://127.0.0.1:8080/fhir"
volumes:
- hapi:/data/hapi
ports:
- 8080:8080
blaze:
image: "samply/blaze:latest"
env:
JAVA_TOOL_OPTIONS: "-Xmx2g"
BASE_URL: "http://127.0.0.1:8081"
volumes:
- blaze:/app/data
ports:
- 8081:8080
env:
FHIR_API_URL: http://127.0.0.1:8080/fhir
TRANSFER_SERVER_URL: http://127.0.0.1:8081/fhir
TRANSFER_API_URL: http://127.0.0.1:8081/fhir
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"
- name: Install deps
run: |
poetry lock
poetry install --with dev --all-extras
- name: Prefill servers with data
run: |
poetry run python ./testing/prefill.py
- name: Lint with ruff
run: |
poetry run ruff .
- name: Tests and coverage report
run: |
poetry run coverage run -m pytest fhir_kindling
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
name: codecov-umbrella
verbose: true
- name: Build and deploy documentation
run: poetry run mkdocs gh-deploy --force