-
Notifications
You must be signed in to change notification settings - Fork 123
62 lines (58 loc) · 2.02 KB
/
Copy pathci.yaml
File metadata and controls
62 lines (58 loc) · 2.02 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
id: setup-uv
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
- name: Install dependencies
run: |
uv run python --version
uv pip install -e .[test]
- run: uv run flake8 ./fhir/resources/
- run: uv run black --check fhir/resources/
# monthly cache updates
- run: echo "cache_id=$(date --utc '+%m')" >> "$GITHUB_ENV"
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
key: fhir-resources-${{ env.cache_id }}
path: .cache
restore-keys: |
fhir-resources-
- name: Run main tests with Python ${{ matrix.python-version }}
run: |
which pytest
uv run pytest tests
- name: Run STU3 tests with Python ${{ matrix.python-version }}
run: |
uv run pytest fhir/resources/STU3/tests
- name: Run R4B tests with Python ${{ matrix.python-version }}
run: |
uv run pytest -s --cov=fhir/resources/R4B/tests -s --tb=native -v --cov-report term-missing --cov-append fhir/resources/R4B/tests
- name: Run R5 tests with Python ${{ matrix.python-version }}
run: |
uv run pytest -s --cov=fhir/resources/tests -s --tb=native -v --cov-report term-missing --cov-append fhir/resources/tests