-
Notifications
You must be signed in to change notification settings - Fork 25
57 lines (48 loc) · 1.53 KB
/
main.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
name: Test MicropyCli
on:
pull_request: ~
push:
branches:
- master
env:
POETRY_VERSION: 1.4.1
concurrency:
group: main-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test:
name: ${{ matrix.os }} @ Py v${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# explicitly use macOS-12 to avoid
# macOS-11 cached wheels failing to install on a 12 runner.
# this is due to an active transition by github.
# see: https://github.blog/changelog/2022-10-03-github-actions-jobs-running-on-macos-latest-are-now-running-on-macos-12/
os: [ windows-latest, macOS-12, ubuntu-latest ]
python: [ "3.8", "3.9", "3.10", "3.11" ]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup environment.
uses: ./.github/actions/setup-micropy
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ matrix.python }}
- name: Run Tests
run: poetry run pytest --cov --cov-config=pyproject.toml --junit-xml=test_log.xml --cov-report=xml:cov.xml -vv -ra -n'auto'
- name: Upload Codecov
uses: codecov/codecov-action@v3
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
with:
files: ./cov.xml
fail_ci_if_error: false
flags: unittests,py-${{ matrix.python }},os-${{ matrix.os }}
env_vars: OS,PYTHON