Repository navigation
56 lines (54 loc) · 1.55 KB
/
Copy pathci.yml
File metadata and controls
56 lines (54 loc) · 1.55 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
defaults:
run:
shell: bash -el {0}
name: CI
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python: ['3.13']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Configure Poetry
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
# Export a native Windows path so PowerShell can also find Poetry.
cygpath -w "$(dirname "$(command -v poetry)")" >> "$GITHUB_PATH"
poetry env use python
else
poetry env use python${{ matrix.python }}
fi
- name: Install package
run: |
poetry install --with test
- name: Set up MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Run tests
if: runner.os != 'Windows'
run: |
poetry run pytest --junit-xml=test-${{ matrix.os }}-Python-${{ matrix.python }}.xml
- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
poetry run pytest --junit-xml=test-${{ matrix.os }}-Python-${{ matrix.python }}.xml
- uses: codecov/codecov-action@v5
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main