-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.46 KB
/
ci.yml
File metadata and controls
50 lines (47 loc) · 1.46 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
name: CI
on:
push:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
# Use Poetry 2.2.1 for Python 3.9 compatibility
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "2.2.1"
- name: Install dependencies with Poetry
# poetry setuptools workaround sourced from:
# https://github.com/python-poetry/poetry/issues/7611#issuecomment-1711443539
run: |
poetry --version
poetry self add setuptools
poetry install
# Install twine to test build
python -m pip install build twine
- name: Run pre-commit
run: poetry run pre-commit run --all-files
- name: Build docs
run: |
cd docs && poetry run make html && cd ..
- name: Test syntax of build package
run: |
python -m build
python -m twine check dist/*
- name: Run pytest
run: poetry run pytest -v --cov-report term-missing --cov
- name: Coveralls
if: ${{ success() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: poetry run coveralls --service=github