-
Notifications
You must be signed in to change notification settings - Fork 77
75 lines (62 loc) · 2.04 KB
/
Copy pathtest-build.yml
File metadata and controls
75 lines (62 loc) · 2.04 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
63
64
65
66
67
68
69
70
71
72
73
74
75
name: mfr_ci_testing
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-24.04
env:
GHA_DISTRO: ubuntu-24.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
python-version: [3.13]
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache Build Requirements
id: pip-cache-step
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ env.GHA_DISTRO }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install poetry==2.1.2 setuptools==80.1.0
poetry install --no-root --without=docs --with=dev
runtests:
name: Run unit tests
needs: build
runs-on: ubuntu-24.04
env:
GHA_DISTRO: ubuntu-24.04
strategy:
matrix:
python-version: [3.13]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ env.GHA_DISTRO }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
- name: Install test dependencies
run: |
python -m pip install poetry==2.1.2
python -m pip install setuptools==80.1.0
poetry install --without=docs --with=dev
- name: Run flake8
run: poetry run flake8 .
- name: Run unit tests
run: |
poetry run pytest --cov-report term-missing --cov mfr tests
- name: Upload coverage to Coveralls
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}