Skip to content

Commit 58dd697

Browse files
committed
chore: GHA
1 parent a89496a commit 58dd697

3 files changed

Lines changed: 79 additions & 13 deletions

File tree

.forgejo/workflows/tests.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
github: [yaal-coop]

.github/workflows/tests.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
name: tests
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '*.*.*'
8+
pull_request:
9+
branches:
10+
- main
11+
- '*.*.*'
12+
13+
jobs:
14+
tests:
15+
name: ${{ matrix.python }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python:
21+
- '3.12'
22+
- '3.11'
23+
- '3.10'
24+
- '3.9'
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Install Poetry
28+
uses: snok/install-poetry@v1
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python }}
32+
cache: 'poetry'
33+
- name: Install dependencies and run tests
34+
run: |
35+
poetry --version
36+
poetry install
37+
poetry run pytest --showlocals
38+
39+
minversions:
40+
name: minimum dependency versions
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Install Poetry
45+
uses: snok/install-poetry@v1
46+
- uses: actions/setup-python@v5
47+
with:
48+
python-version: '3.9'
49+
cache: 'poetry'
50+
- run: sed -i -E 's/"(\^|>=)([0-9\.]+)([^,]*)"/"==\2"/' pyproject.toml
51+
- run: sed -i -E 's/python = "==/python = "^/' pyproject.toml
52+
- name: Install dependencies and run tests
53+
run: |
54+
poetry --version
55+
poetry lock
56+
poetry install
57+
poetry run pytest --showlocals
58+
59+
style:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: pre-commit/action@v3.0.1
64+
65+
doc:
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
- name: Install Poetry
70+
uses: snok/install-poetry@v1
71+
- uses: actions/setup-python@v5
72+
with:
73+
python-version: '3.12'
74+
cache: 'poetry'
75+
- run: |
76+
poetry install --with doc
77+
poetry run sphinx-build doc build/sphinx/html

0 commit comments

Comments
 (0)