Skip to content

Commit

Permalink
Merge pull request #474 from bsipocz/CI_reorg_ci
Browse files Browse the repository at this point in the history
CI: reorg workflows; fix RTD versioning; fix dev version installs
  • Loading branch information
bsipocz authored Aug 9, 2023
2 parents 7a80e4c + 5b53b9a commit 6656130
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 23 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci_devtests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This test job is separated out into its own workflow to be able to trigger separately
name: CI-devtest

on:
push:
branches:
- main
- 'v*'
tags:
- '*'
pull_request:
schedule:
- cron: "0 3 * * 6"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
devdeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install tox
run: python -m pip install --upgrade tox
- name: Run tests against dev dependencies
run: tox -e py311-test-devdeps-alldeps-cov

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
verbose: true
28 changes: 8 additions & 20 deletions .github/workflows/cibuild.yml → .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Developer version testing is in separate workflow
name: CI

on:
Expand All @@ -10,6 +11,11 @@ on:
pull_request:
schedule:
- cron: "0 3 * * 6"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
Expand Down Expand Up @@ -69,6 +75,8 @@ jobs:

stylecheck:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
Expand All @@ -79,23 +87,3 @@ jobs:
run: python -m pip install --upgrade tox
- name: Check codestyle
run: tox -e codestyle


devdeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install tox
run: python -m pip install --upgrade tox
- name: Run tests against dev dependencies
run: tox -e py311-test-devdeps-alldeps-cov

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
verbose: true
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ build:
python: "3.10"
apt_packages:
- graphviz
jobs:
post_checkout:
- git fetch --unshallow || true

python:
system_packages: false
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ description =
setenv =
PYTEST_ARGS = -rsxf --show-capture=no
online: PYTEST_ARGS = --remote-data=any --reruns=1 --reruns-delay 10 -rsxf --show-capture=no
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple

deps =
cov: coverage

devdeps: numpy>=0.0.dev0
devdeps: astropy>=0.0.dev0

oldestdeps: astropy==4.1
# We set a suitably old numpy along with an old astropy, no need to pick up
# deprecations and errors due to their unmatching versions
Expand All @@ -37,9 +41,6 @@ deps =
online: pytest-rerunfailures

commands =
devdeps: pip install -U --pre --only-binary :all: -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
devdeps: pip install -U --pre -i https://pypi.anaconda.org/astropy/simple astropy

pip freeze
!cov: pytest --pyargs {env:PYTEST_ARGS}
cov: pytest --pyargs --cov pyvo --cov-config={toxinidir}/setup.cfg {env:PYTEST_ARGS}
Expand Down

0 comments on commit 6656130

Please sign in to comment.