-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (73 loc) · 2.82 KB
/
pytest_mpflash.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
# This workflow will :
# - test mpflash
# - upload coverage stats to Codecov
# - upload artifacts from the results folder
name: pytest_mpflash
on:
workflow_dispatch:
pull_request:
# branches: [main]
push:
branches: [main, dev/*, mpflash/*, feat/*, fix/*]
paths:
- .github/workflows/pytest_mpflash.yml
- .github/workflows/codecov.yml
- "mpflash/**"
- "pyproject.toml"
- "poetry.lock"
- "tests"
env:
PYTHONIOENCODING: utf-8
# fix: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
JUPYTER_PLATFORM_DIRS: "1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_mpflash:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
# include: # for testing
# - os: ubuntu-latest
# python-version: "3.11"
steps:
- name: Checkout repository
uses: actions/checkout@v4
#----------------------------------------------
# poetry is not in the default image
#----------------------------------------------
- name: Install poetry and codecov
run: |
pipx install poetry==2.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# cache: "poetry"
# #----------------------------------------------
# # install project
# #----------------------------------------------
- name: Install mpflash & test dependencies
run: |
poetry install --with test
- name: Test mpflash
run: |
poetry run pytest --cov --cov-branch --cov-report=xml
# #----------------------------------------------
# # upload coverage stats
# # .XML to Codecov
# #----------------------------------------------
- name: Upload coverage-mpflash-*.xml to Codecov
if: always() # ignore errors
continue-on-error: true
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: false
# file: results/coverage-mpflash-${{ matrix.python-version }}-${{ matrix.os }}.xml
# flags: mpflash