Skip to content

Bump the actions group in /.github/workflows with 3 updates #203

Bump the actions group in /.github/workflows with 3 updates

Bump the actions group in /.github/workflows with 3 updates #203

Workflow file for this run

name: Run unit tests
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: ${{ matrix.name }} (${{ matrix.os }}, ${{ matrix.toxenv }})
runs-on: ${{ matrix.os }}
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))"
strategy:
fail-fast: false
matrix:
include:
- name: Python 3.11 with required dependencies (and gcc 11.2)
os: ubuntu-22.04 # gcc 11.2
python-version: "3.11"
toxenv: py311-test-numpy126
- name: Python 3.11 with required dependencies
os: macos-latest
python-version: "3.11"
toxenv: py311-test-astropy60
- name: Python 3.12 with required dependencies (and gcc 13.2)
os: ubuntu-24.04 # gcc 13.2
python-version: "3.12"
toxenv: py312-test-astropy70
coverage: true
- name: Python 3.13 with required dependencies
os: windows-latest
python-version: "3.13"
toxenv: py313-test
- name: Python 3.14 with required dependencies
os: macos-latest
python-version: "3.14"
toxenv: py314-test
- name: Code style checks
os: ubuntu-latest
python-version: "3.13"
toxenv: codestyle
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
if: "! matrix.coverage"
run: tox -v -e ${{ matrix.toxenv }}
- name: Run tests with coverage
if: "matrix.coverage"
run: |
pip install Cython extension-helpers numpy
COVERAGE=1 pip install -e .[test]
pytest --pyargs astroscrappy docs --cov astroscrappy
- name: Upload coverage to codecov
if: "matrix.coverage"
run: |
pip install codecov
codecov
publish:
needs: tests
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@9f1fedda61294df4c004c05519a3fbf3b8e1f32f # v2.3.1
with:
env: |
EXTENSION_HELPERS_PY_LIMITED_API: 'cp311'
test_extras: test
test_command: pytest -p no:warnings --pyargs astroscrappy
targets: |
- cp*-manylinux_x86_64
- target: cp*-manylinux_aarch64
runs-on: ubuntu-24.04-arm
- cp*-macosx_x86_64
- cp*-macosx_arm64
- cp*-win_amd64
secrets:
pypi_token: ${{ secrets.pypi_token }}
anaconda_token: ${{ secrets.anaconda_token }}