Skip to content

Merge pull request #15529 from eerovaher/ruff-python-target-version #40

Merge pull request #15529 from eerovaher/ruff-python-target-version

Merge pull request #15529 from eerovaher/ruff-python-target-version #40

Workflow file for this run

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@v6
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.11 with minimal dependencies and full coverage
linux: py311-test-cov
coverage: codecov
- name: Python 3.10 in Parallel with all optional dependencies
linux: py310-test-alldeps-fitsio
libraries:
apt:
- language-pack-fr
- tzdata
- libcfitsio-dev
toxargs: -v --develop
posargs: -n=4 --run-slow
- name: Python 3.9 with oldest supported version of all dependencies
linux: py39-test-oldestdeps-alldeps-cov-clocale
posargs: --remote-data=astropy
coverage: codecov
- name: Python 3.10 with all optional dependencies (Windows)
windows: py310-test-alldeps
posargs: --durations=50
- name: Python 3.10 with all optional dependencies (MacOS X)
macos: py310-test-alldeps
posargs: --durations=50 --run-slow
- name: Python 3.9 Double test (Run tests twice)
linux: py39-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
# https://github.com/matplotlib/matplotlib/issues/26847
- name: (Allowed Failure) Python 3.11 with dev version of matplotlib
linux: py311-test-mpldev
posargs: --verbose