Skip to content

Commit

Permalink
Merge pull request #343 from pllim/rc-testing-workflow
Browse files Browse the repository at this point in the history
TST: Pin to tox<4
  • Loading branch information
pllim authored Dec 8, 2022
2 parents a5fa653 + 4d68a03 commit bdbadba
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
initial_check:
name: Mandatory checks before CI
Expand Down Expand Up @@ -108,7 +111,9 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip tox
run: |
python -m pip install --upgrade pip
python -m pip install "tox<4"
- name: Run tests
run: tox -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
- name: Upload coverage to codecov
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
analyze:
name: Analyze
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/open_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
types:
- opened

permissions:
contents: read

jobs:
triage:
runs-on: ubuntu-latest
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/predeps_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: rc-testing

on:
workflow_dispatch:

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

permissions:
contents: read

jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:

- name: RC test on Linux with remote data
os: ubuntu-latest
python: '3.11'
toxenv: py311-test-predeps
toxposargs: --remote-data

- name: RC test on OSX
os: macos-latest
python: '3.10'
toxenv: py310-test-predeps

- name: RC test on Windows
os: windows-latest
python: 3.9
toxenv: py39-test-predeps

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "tox<4"
- name: Run tests
run: tox -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[tox]
envlist =
py{38,39,310,311}-test{,-alldeps,-oldestdeps,-devdeps}{,-cov}
py{38,39,310,311}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-cov}
codestyle
twine
bandit
linkcheck
requires =
setuptools >= 30.3.0
pip >= 19.3.1
tox < 4
isolated_build = true

[testenv]
Expand Down Expand Up @@ -57,6 +61,10 @@ commands =
cov: pytest --pyargs synphot {toxinidir}/docs --cov synphot --cov-config={toxinidir}/setup.cfg {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml

pip_pre =
predeps: true
!predeps: false

[testenv:codestyle]
skip_install = true
changedir = {toxinidir}
Expand Down

0 comments on commit bdbadba

Please sign in to comment.