|
1 | | -# This is a basic workflow to help you get started with Actions |
2 | | - |
3 | 1 | name: CI Tests |
4 | 2 |
|
5 | | -# Controls when the workflow will run |
6 | 3 | on: |
7 | 4 | push: |
8 | 5 | branches: |
9 | 6 | - main |
10 | 7 | paths: |
11 | 8 | - "fhir_pyrate/**" |
12 | 9 | - "tests/**" |
| 10 | + - ".pre-commit-config.yaml" |
| 11 | + - "pyproject.toml" |
| 12 | + - "uv.lock" |
13 | 13 | pull_request: |
14 | 14 | paths: |
15 | 15 | - "fhir_pyrate/**" |
16 | 16 | - "tests/**" |
17 | | - # Allows you to run this workflow manually from the Actions tab |
| 17 | + - ".pre-commit-config.yaml" |
| 18 | + - "pyproject.toml" |
| 19 | + - "uv.lock" |
18 | 20 | workflow_dispatch: |
19 | 21 |
|
20 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
21 | 22 | jobs: |
22 | | - # This workflow contains a single job called "build" |
23 | | - build: |
24 | | - # The type of runner that the job will run on |
| 23 | + test: |
25 | 24 | runs-on: ubuntu-latest |
26 | 25 | strategy: |
| 26 | + fail-fast: false |
27 | 27 | matrix: |
28 | 28 | python-version: ["3.10", "3.11", "3.12"] |
29 | 29 |
|
30 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
31 | 30 | steps: |
32 | | - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
33 | | - - uses: actions/checkout@v3 |
| 31 | + - uses: actions/checkout@v4 |
34 | 32 |
|
35 | | - # Set up python |
36 | 33 | - name: Set up Python ${{ matrix.python-version }} |
37 | | - uses: actions/setup-python@v3 |
| 34 | + uses: actions/setup-python@v5 |
38 | 35 | with: |
39 | 36 | python-version: ${{ matrix.python-version }} |
40 | 37 |
|
41 | | - # Install poetry |
42 | | - - name: Install poetry |
43 | | - run: | |
44 | | - curl -sSL https://install.python-poetry.org | python3 - |
45 | | - poetry run pip install -U pip |
46 | | - poetry install -E all |
47 | | - - name: Run MyPy |
| 38 | + - name: Install uv |
48 | 39 | run: | |
49 | | - poetry run mypy --install-types --non-interactive fhir_pyrate |
50 | | - poetry run mypy --install-types --non-interactive tests |
51 | | - - name: Run Flake8 |
| 40 | + python -m pip install -U pip |
| 41 | + pip install uv |
| 42 | + uv sync --group dev --extra all |
| 43 | +
|
| 44 | + - name: Run pre-commit |
52 | 45 | run: | |
53 | | - poetry run flake8 fhir_pyrate/ |
54 | | - poetry run flake8 tests/ |
55 | | - - name: Run Tests |
| 46 | + uv run pre-commit run -a |
| 47 | +
|
| 48 | + - name: Run pytest |
56 | 49 | run: | |
57 | | - poetry run python -m unittest discover tests |
| 50 | + uv run pytest -q |
0 commit comments