Skip to content

Commit 0e4f8a0

Browse files
committed
ci(tests): add python_tests.yaml and requirements.txt for that
1 parent 2d5be77 commit 0e4f8a0

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: tests
2+
run-name: Run tests
3+
4+
on:
5+
push:
6+
workflow_dispatch:
7+
8+
jobs:
9+
tests:
10+
permissions:
11+
contents: write
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
python-version: '3.10'
18+
- os: ubuntu-latest
19+
python-version: '3.10'
20+
- os: ubuntu-latest
21+
python-version: '3.11'
22+
- os: ubuntu-latest
23+
python-version: '3.12'
24+
- os: windows-latest
25+
python-version: '3.12'
26+
- os: macos-latest
27+
python-version: '3.12'
28+
29+
steps:
30+
- name: Check out repository
31+
uses: actions/checkout@v4
32+
33+
- name: Install python and dependencies
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
cache: 'pip'
38+
39+
- name: Install requirements (Windows)
40+
if: runner.os == 'Windows'
41+
run: python -m pip install -r requirements.txt
42+
43+
- name: Install requirements (Unix)
44+
if: runner.os != 'Windows'
45+
run: pip install -r requirements.txt
46+
47+
- name: Run tests (with coverage for Ubuntu 3.13)
48+
run: pytest

requirements.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
flake8==7.3.0
2+
lintquarto==0.7.0
3+
numpy==2.4.1
4+
pandas==2.3.3
5+
pip==25.3
6+
pylint==4.0.4
7+
pytest==9.0.2
8+
pytest-cov==7.0.0
9+
python==3.12.12
10+
scipy==1.17.0
11+
-e examples/python_package/.

0 commit comments

Comments
 (0)