Bump default python version to 3.11 in CI workflows #9
Workflow file for this run
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: Weekly Cron Tests | |
on: | |
schedule: | |
# run every Monday at 5am UTC | |
- cron: '0 5 * * 1' | |
pull_request: | |
# We also want this workflow triggered if the 'Weekly CI' label is added | |
# or present when PR is updated | |
types: | |
- synchronize | |
- labeled | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
TOXARGS: '-v' | |
IS_CRON: 'true' | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
if: (github.repository == 'astropy/regions' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI'))) | |
name: ${{ matrix.os }}, ${{ matrix.tox_env }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.allow_failure }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python: '3.11' | |
tox_env: 'py311-test-alldeps-devinfra' | |
allow_failure: false | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- name: Print Python, pip, setuptools, and tox versions | |
run: | | |
python -c "import sys; print(f'Python {sys.version}')" | |
python -c "import pip; print(f'pip {pip.__version__}')" | |
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')" | |
python -c "import tox; print(f'tox {tox.__version__}')" | |
- name: Run tests | |
run: tox -e ${{ matrix.tox_env }} -- ${{ matrix.toxposargs }} | |
test_more_architectures: | |
# The following architectures are emulated and are therefore slow, so | |
# we include them just in the weekly cron. These also serve as a test | |
# of using system libraries and using pytest directly. | |
runs-on: ubuntu-20.04 | |
name: More architectures | |
if: (github.repository == 'astropy/regions' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Arch CI'))) | |
env: | |
ARCH_ON_CI: ${{ matrix.arch }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: aarch64 | |
- arch: s390x | |
- arch: ppc64le | |
- arch: armv7 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Run tests | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ubuntu_rolling | |
shell: /bin/bash | |
env: | | |
ARCH_ON_CI: ${{ env.ARCH_ON_CI }} | |
IS_CRON: ${{ env.IS_CRON }} | |
install: | | |
apt-get update -q -y | |
apt-get install -q -y git \ | |
g++ \ | |
pkg-config \ | |
python3 \ | |
python3-configobj \ | |
python3-numpy \ | |
python3-astropy \ | |
python3-ply \ | |
python3-venv \ | |
cython3 \ | |
libwcs7 \ | |
wcslib-dev \ | |
liberfa1 | |
run: | | |
echo "LONG_BIT="$(getconf LONG_BIT) | |
python3 -m venv --system-site-packages tests | |
source tests/bin/activate | |
ASTROPY_USE_SYSTEM_ALL=1 pip3 install -e .[test] | |
pip3 list | |
python3 -m pytest |