CI #204
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
name: CI | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 6 * * 1' # Every Monday at 6am UTC | |
push: | |
branches: | |
- main | |
- stable | |
- '*.x' | |
tags: | |
- '*' | |
pull_request: | |
# Only cancel in-progress jobs or runs for the current workflow | |
# This cancels the already triggered workflows for a specific PR without canceling | |
# other instances of this workflow (other PRs, scheduled triggers, etc) when something | |
# within that PR re-triggers this CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: pre-commit/action@v3.0.1 | |
core: | |
needs: [pre-commit] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.10' | |
envs: | | |
- linux: coverage | |
name: Python 3.12 coverage | |
python-version: 3.12 | |
- linux: coverage | |
name: Python 3.11 coverage | |
python-version: 3.11 | |
- linux: coverage | |
name: Python 3.10 coverage | |
python-version: 3.10 | |
- linux: coverage | |
name: Python 3.9 coverage | |
python-version: 3.9 | |
coverage: codecov | |
jsonschema: | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
if: (github.repository == 'asdf-format/asdf' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'jsonschema'))) | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.10' | |
envs: | | |
- linux: jsonschema | |
asdf-schemas: | |
needs: [core] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.10' | |
envs: | | |
- linux: asdf-standard | |
- linux: asdf-transform-schemas | |
- linux: asdf-unit-schemas | |
test: | |
needs: [core] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.9' | |
envs: | | |
- macos: py39-parallel | |
- windows: py39-parallel | |
dev: | |
needs: [core] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.9' | |
envs: | | |
- linux: py39-devdeps-parallel | |
- linux: py310-devdeps-parallel | |
- linux: py311-devdeps-parallel | |
- linux: py312-devdeps-parallel | |
# separate pytest so a failure here doesn't cause the whole suite to fail | |
- linux: py311-pytestdev-parallel | |
oldest: | |
needs: [core] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.9' | |
envs: | | |
- linux: py39-oldestdeps-parallel | |
compatibility: | |
needs: [core] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
submodules: false | |
# Any env name which does not start with `pyXY` will use this Python version. | |
default_python: '3.9' | |
envs: | | |
- linux: compatibility | |
package: | |
needs: [core] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 | |
with: | |
python-version: "3.11" | |
upload_to_pypi: false | |
upload_to_anaconda: false | |
test_extras: tests | |
test_command: pytest --pyargs asdf |