forked from etingof/pysmi
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (48 loc) · 1.24 KB
/
build-test.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
name: CI
on:
push:
branches:
- "main"
# - "develop"
pull_request:
branches: [main]
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.6.1"
- name: Build
run: |
poetry install
poetry build
- name: Test
run: |
poetry add --group dev pytest-cov
poetry run pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=com --cov-report=xml --cov-report=html
- name: Test summary
uses: test-summary/action@v2
with:
paths: "junit/*.xml"
if: always()
# - uses: actions/upload-artifact@v4
# with:
# name: dist
# path: dist
# - uses: actions/upload-artifact@v4
# with:
# name: output
# path: output