Remove testrunner and move to pyproject.toml #43
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: Monthly cron | |
on: | |
schedule: | |
# run every 19th of the month at 6am UTC | |
- cron: '0 6 19 * *' | |
pull_request: | |
# We also want this workflow triggered if the 'Extra CI' label is added | |
# or present when PR is updated | |
types: | |
- synchronize | |
- labeled | |
push: | |
# We want this workflow to always run on release branches as well as | |
# all tags since we want to be really sure we don't introduce | |
# regressions on the release branches, and it's also important to run | |
# this on pre-release and release tags. | |
branches: | |
- 'v*' | |
tags: | |
- '*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
test_more_architectures: | |
# The following architectures are emulated and are therefore slow, so | |
# we include them just in the monthly cron. These also serve as a test | |
# of using system libraries and using pytest directly. | |
runs-on: ubuntu-latest | |
name: Python 3.12 | |
# Don't run on forks of the repository. | |
if: (github.repository == 'mhvk/baseband-tasks' && (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'Extra CI'))) | |
env: | |
# git needed by python3-setuptools-scm (and not a required dependency). | |
# On most, python3-pyfftw cannot be installed (known problem). | |
apt_packages: python3-astropy python3-h5py python3-pytest-astropy git python3-setuptools-scm python3-pip | |
pip_packages: baseband | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: s390x | |
- arch: armv7 | |
- arch: ppc64le | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- uses: uraimo/run-on-arch-action@5397f9e30a9b62422f302092631c99ae1effcd9e # v2.8.1 | |
name: Run tests | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ubuntu_rolling | |
shell: /bin/bash | |
install: | | |
apt-get update -q -y | |
apt-get install -q -y --no-install-recommends ${{ env.apt_packages }} | |
python3 -m pip install --user --break-system-packages ${{ env.pip_packages }} | |
run: | | |
uname -a | |
echo "LONG_BIT="$(getconf LONG_BIT) | |
python3 setup.py egg_info | |
python3 -m pytest | |
test_with_apt: | |
name: Test using apt | |
runs-on: ubuntu-latest # once beyond 24.04 can remove no:doctest_plus below. | |
if: (github.repository == 'mhvk/baseband-tasks' && (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'Extra CI'))) | |
env: | |
# 2025-02-21: pyfftw seems broken; maybe try again with more recent ubuntu. | |
apt_packages: python3-astropy python3-h5py python3-pip | |
pip_packages: baseband==4.1.* | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Install system dependencies | |
if: env.apt_packages | |
run: sudo apt-get install -y --no-install-recommends ${{ env.apt_packages }} | |
- name: Install Python dependencies | |
if: env.pip_packages | |
run: python -m pip install --user ${{ env.pip_packages }} | |
- name: Run tests | |
run: | | |
python3 setup.py egg_info | |
python3 -m pytest -p no:doctest_plus | |
test_other_os: | |
name: Test on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
if: (github.repository == 'mhvk/baseband-tasks' && (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'Extra CI'))) | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
- os: macos-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: 3.x | |
- name: Install Python dependencies | |
run: python -m pip install --upgrade tox | |
- name: Run tests | |
run: tox -v -e test |