Merge pull request #16277 from eerovaher/coord-matching-tests #45
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: | |
push: | |
branches: | |
- main | |
- 'v*' | |
tags: | |
- '*' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
ARCH_ON_CI: "normal" | |
IS_CRON: "false" | |
jobs: | |
initial_checks: | |
name: Mandatory checks before CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check base branch | |
uses: actions/github-script@v7 | |
if: github.event_name == 'pull_request' | |
with: | |
script: | | |
const skip_label = 'skip-basebranch-check'; | |
const { default_branch: allowed_basebranch } = context.payload.repository; | |
const pr = context.payload.pull_request; | |
if (pr.user.login === 'meeseeksmachine') { | |
core.info(`Base branch check is skipped since this is auto-backport by ${pr.user.login}`); | |
return; | |
} | |
if (pr.labels.find(lbl => lbl.name === skip_label)) { | |
core.info(`Base branch check is skipped due to the presence of ${skip_label} label`); | |
return; | |
} | |
if (pr.base.ref !== allowed_basebranch) { | |
core.setFailed(`PR opened against ${pr.base.ref}, not ${allowed_basebranch}`); | |
} else { | |
core.info(`PR opened correctly against ${allowed_basebranch}`); | |
} | |
tests: | |
needs: [initial_checks] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
secrets: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
setenv: | | |
ARCH_ON_CI: "normal" | |
IS_CRON: "false" | |
submodules: false | |
coverage: '' | |
libraries: | | |
apt: | |
- language-pack-fr | |
- tzdata | |
envs: | | |
# NOTE: this coverage test is needed for tests and code that | |
# run only with minimal dependencies. | |
- name: Python 3.12 with minimal dependencies and full coverage | |
linux: py312-test-cov | |
coverage: codecov | |
- name: Python 3.11 in Parallel with all optional dependencies | |
linux: py311-test-alldeps-fitsio | |
libraries: | |
apt: | |
- language-pack-fr | |
- tzdata | |
- libcfitsio-dev | |
toxargs: -v --develop | |
posargs: -n=4 --run-slow | |
- name: Python 3.10 with oldest supported version of all dependencies | |
linux: py310-test-oldestdeps-alldeps-cov-clocale | |
posargs: --remote-data=astropy | |
coverage: codecov | |
- name: Python 3.11 with all optional dependencies (Windows) | |
windows: py311-test-alldeps | |
posargs: --durations=50 | |
- name: Python 3.11 with all optional dependencies (MacOS X) | |
macos: py311-test-alldeps | |
posargs: --durations=50 --run-slow | |
- name: Python 3.10 Double test (Run tests twice) | |
linux: py310-test-double | |
allowed_failures: | |
needs: [initial_checks] | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
setenv: | | |
ARCH_ON_CI: "normal" | |
IS_CRON: "false" | |
submodules: false | |
coverage: '' | |
libraries: | | |
apt: | |
- language-pack-de | |
- tzdata | |
envs: | | |
- name: (Allowed Failure) Python 3.12 with remote data and dev version of key dependencies | |
linux: py312-test-devdeps | |
posargs: --remote-data=any --verbose |