-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor toxenvs, use OpenAstronomy workflows, and move MacOS jobs to…
… schedule (#197)
- Loading branch information
Showing
3 changed files
with
79 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Weekly cron | ||
|
||
on: | ||
schedule: | ||
# Weekly Monday 6AM build | ||
- cron: "0 0 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | ||
with: | ||
envs: | | ||
- macos: test-xdist | ||
python-version: 3.8 | ||
- macos: test-xdist | ||
python-version: 3.9 | ||
- macos: test-xdist | ||
python-version: 3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
[tox] | ||
envlist= py38,style | ||
envlist = | ||
check-{style,build} | ||
test-xdist | ||
build-{docs,dist} | ||
|
||
[testenv] | ||
extras= test | ||
commands= | ||
pytest | ||
deps= | ||
py310: git+https://github.com/pytest-dev/pytest | ||
|
||
[testenv:egg_info] | ||
deps= | ||
commands= | ||
python setup.py egg_info | ||
|
||
[testenv:twine] | ||
deps= | ||
twine | ||
|
||
commands= | ||
twine check {distdir}/* | ||
|
||
[testenv:style] | ||
skip_install = true | ||
[testenv:check-style] | ||
description = Run all style and file checks with pre-commit | ||
skip_install = true | ||
deps = | ||
pre-commit | ||
commands = | ||
pre-commit install-hooks | ||
pre-commit run {posargs:--color always --all-files --show-diff-on-failure} | ||
|
||
[testenv] | ||
description = | ||
run tests | ||
cov: with coverage | ||
xdist: using parallel processing | ||
extras = | ||
test | ||
deps = | ||
xdist: pytest-xdist | ||
cov: pytest-cov | ||
commands_pre = | ||
pip freeze | ||
commands = | ||
pytest \ | ||
xdist: -n auto \ | ||
cov: --cov --cov-report=term-missing --cov-report=xml \ | ||
{posargs} | ||
|
||
[testenv:build-docs] | ||
description = invoke sphinx-build to build the HTML docs | ||
extras = docs | ||
commands = | ||
sphinx-build -W docs docs/_build | ||
|
||
[testenv:build-dist] | ||
description = build wheel and sdist | ||
skip_install = true | ||
deps = | ||
build | ||
commands = | ||
python -m build |