Skip to content

Commit

Permalink
reorganize the CI so that it supports different python versions via l…
Browse files Browse the repository at this point in the history
…ockfiles
  • Loading branch information
DomFijan committed Oct 25, 2024
1 parent 999ed43 commit fda441b
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 36 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ jobs:
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.12
- name: Set up Python environment
uses: glotzerlab/workflows/setup-uv@5cfac9da9cb78e16ae97a9119b6fd13c1c2d6f5e # 0.1.0
with:
lockfile: ".github/workflows/requirements-build.txt"

- name: Build wheel
run: python3 -m build --outdir dist/ .
- name: Install build dependencies
run: |
python --version
python -m pip install --progress-bar off build
- name: Build wheels and sdist
run: python -m build --sdist --wheel --outdir dist/ .

- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: dist
path: dist
name: wheel
path: dist/*.whl
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: sdist
path: dist/*.tar.gz

upload_pypi:
name: Publish [PyPI]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/requirements-build.in

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/requirements-build.txt

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/requirements-test.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
numpy == 2.0.0
pytest == 8.2.2
pytest-cov == 5.0.0
scipy == 1.13.1
numpy
pytest
scipy
20 changes: 20 additions & 0 deletions .github/workflows/requirements3.10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements-test.in --python-version 3.10 --python-platform linux --no-build
exceptiongroup==1.2.2
# via pytest
iniconfig==2.0.0
# via pytest
numpy==2.1.2
# via
# -r requirements-test.in
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.3
# via -r requirements-test.in
scipy==1.14.1
# via -r requirements-test.in
tomli==2.0.2
# via pytest
16 changes: 16 additions & 0 deletions .github/workflows/requirements3.11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements-test.in --python-version 3.11 --python-platform linux --no-build
iniconfig==2.0.0
# via pytest
numpy==2.1.2
# via
# -r requirements-test.in
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.3
# via -r requirements-test.in
scipy==1.14.1
# via -r requirements-test.in
16 changes: 16 additions & 0 deletions .github/workflows/requirements3.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements-test.in --python-version 3.12 --python-platform linux --no-build
iniconfig==2.0.0
# via pytest
numpy==2.1.2
# via
# -r requirements-test.in
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.3
# via -r requirements-test.in
scipy==1.14.1
# via -r requirements-test.in
16 changes: 16 additions & 0 deletions .github/workflows/requirements3.13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements-test.in --python-version 3.13 --python-platform linux --no-build
iniconfig==2.0.0
# via pytest
numpy==2.1.2
# via
# -r requirements-test.in
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.3
# via -r requirements-test.in
scipy==1.14.1
# via -r requirements-test.in
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements-test.in --python-version 3.9 --python-platform linux --no-build
coverage==7.6.4
# via pytest-cov
exceptiongroup==1.2.2
# via pytest
iniconfig==2.0.0
# via pytest
numpy==2.0.0
numpy==2.0.2
# via
# -r requirements-test.in
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.2.2
# via
# -r requirements-test.in
# pytest-cov
pytest-cov==5.0.0
pytest==8.3.3
# via -r requirements-test.in
scipy==1.13.1
# via -r requirements-test.in
tomli==2.0.2
# via
# coverage
# pytest
# via pytest
5 changes: 3 additions & 2 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Set up Python environment
uses: glotzerlab/workflows/setup-uv@5cfac9da9cb78e16ae97a9119b6fd13c1c2d6f5e # 0.1.0
uses: glotzerlab/workflows/setup-uv@33f1cd458d4d39d0101cfa67d13dd3a9e118eefd
with:
lockfile: ".github/workflows/requirements-test.txt"
only-binary: ":none:"
lockfile: ".github/requirements${{matrix.python-version}}.txt"
- name: Run tests
run: python3 -m pytest -v

Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

0 comments on commit fda441b

Please sign in to comment.