Skip to content

Commit 75f739f

Browse files
Update CI workflows and add test requirements file
Refactor GitHub Actions workflows to use 'pip' directly and switch linting from flake8 to ruff. Add tests/requirements.txt to specify test and lint dependencies.
1 parent 179431f commit 75f739f

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,24 @@ jobs:
1818
python-version: [3.9, "3.10", 3.11, 3.12, 3.13]
1919

2020
steps:
21-
- uses: actions/checkout@v6
21+
- name: Checkout
22+
uses: actions/checkout@v6
23+
2224
- name: Set up Python ${{ matrix.python-version }}
2325
uses: actions/setup-python@v6
2426
with:
2527
python-version: ${{ matrix.python-version }}
28+
2629
- name: Install dependencies
2730
run: |
28-
python -m pip install --upgrade pip
29-
python -m pip install flake8 pytest
30-
python -m pip install .
31+
pip install --upgrade pip
32+
pip install .
33+
pip install -r tests/requirements.txt
3134
if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
32-
- name: Lint with flake8
35+
36+
- name: Lint with ruff
3337
run: |
34-
# stop the build if there are Python syntax errors or undefined names
35-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
flake8 opengsq --count --exit-zero --max-complexity=10 --max-line-length=221 --statistics --exclude tests
38+
ruff check
3839
# - name: Test with pytest
3940
# run: |
4041
# pytest

.github/workflows/sphinx-gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747

4848
- name: Install sphinx and dependencies
4949
run: |
50-
python -m pip install --upgrade pip
51-
python -m pip install .
52-
python -m pip install -r docs/requirements.txt
50+
pip install --upgrade pip
51+
pip install .
52+
pip install -r docs/requirements.txt
5353
5454
- name: Sphinx API Documentation Generation
5555
run: sphinx-apidoc -o docs/api opengsq

tests/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pytest==9.0.2
2+
pytest-asyncio==1.3.0
3+
ruff==0.14.9

0 commit comments

Comments
 (0)