Skip to content

Commit

Permalink
Add scheduled workflow to run tests with unpinned dependencies (#1310)
Browse files Browse the repository at this point in the history
* Add scheduled workflow to run tests with unpinned dependencies

* Use macos-latest in favour of specific version

* Skip slow tests in unpinned tests workflow

* Remove unnecessary pip caching

Dependencies installed via tox with caching set up already
for this

* Update crontab schedule to once per month

* Relax version requirement specifier on pandas
  • Loading branch information
matt-graham authored Sep 24, 2024
1 parent 89c838f commit 74c4db9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/tests-unpinned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests with unpinned dependencies

on:
schedule:
- cron: 0 0 15 * *

jobs:
test:
name: Run tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.x]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache tox
uses: actions/cache@v4
with:
path: .tox
key: tox-${{hashFiles('pyproject.toml') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install tox
- name: Run tests
run: tox -v -e py3-latest -- pytest -n auto -vv tests --skip-slow
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"pyshp",
"squarify",
"numpy",
"pandas~=2.0.0",
"pandas~=2.0",
"scipy",
# Avoid https://foss.heptapod.net/openpyxl/openpyxl/-/issues/1963
"openpyxl==3.1.0",
Expand Down
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ deps =
pytest
pytest-cov

[testenv:py3-latest]
deps =
pytest
pytest-xdist
commands =
{posargs:pytest -n auto -vv tests}

[testenv:spell]
setenv =
SPELLCHECK=1
Expand Down

0 comments on commit 74c4db9

Please sign in to comment.