Skip to content

Commit

Permalink
Merge pull request #117 from bird-house/ci-updates
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
Zeitsperre authored Mar 5, 2024
2 parents cd4a85a + 3ac3661 commit 231d17e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- master
pull_request:

concurrency:
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch except on master.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -18,13 +23,17 @@ jobs:
python-version: "3.8"
- tox-env: py39
python-version: "3.9"
- tox-env: pypy38
- tox-env: py310
python-version: "3.10"
- tox-env: py311
python-version: "3.11"
- tox-env: py312
python-version: "3.12"
- tox-env: pypy38-nogdal
python-version: "pypy-3.8"
- tox-env: pypy310-nogdal
python-version: "pypy-3.10"
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ addopts =
--strict
--tb=native
--verbose
tests/
testpaths =
tests
python_files = test_*.py
markers =
online: mark test to need internet connection
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development',
Expand Down
18 changes: 8 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
[tox]
min_version = 4.0
envlist =
py{37,38,39,310,311},
pypy38,
py{37,38,39,310,311,312},
pypy{37,38,39,310}-nogdal,
docs
requires = pip >= 23.0
opts = -v
opts = --verbose

[testenv:docs]
basepython = python
changedir = docs/source
deps = sphinx
commands=
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:pypy37]
commands =
pytest -m "not requires_gdal"
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
allowlist_externals =
sphinx-build

[testenv]
setenv =
Expand All @@ -28,7 +26,7 @@ deps =
install_command = python -m pip install --no-user {opts} {packages}
download = True
commands =
!pypy38: make test
pypy38: make test-no-gdal
!nogdal: make test
nogdal: make test-no-gdal
allowlist_externals =
make
4 changes: 3 additions & 1 deletion {{cookiecutter.project_slug}}/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
'Programming Language :: Python',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Atmospheric Science',
{%- if cookiecutter.open_source_license in license_classifiers %}
'{{ license_classifiers[cookiecutter.open_source_license] }}',
Expand Down

0 comments on commit 231d17e

Please sign in to comment.