Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"short_description": "Atomic and molecular opacities from MAESTRO",
"author_name": "Brett Morris",
"author_email": "morrisbrettm@gmail.com",
"project_url": "https://github.com/bmorris3/opacity",
"project_url": "https://github.com/opacities/opacity",
"license": "Other",
"minimum_python_version": "3.11",
"use_compiled_extensions": "n",
Expand Down
41 changes: 36 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,57 @@ concurrency:
cancel-in-progress: true

jobs:
test:
ci_tests:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- name: tests, py3.11
- name: py3.11
linux: test
os: ubuntu-latest
python-version: 3.11

- name: tests, py3.12
- name: py3.12
linux: test
os: ubuntu-latest
python-version: 3.12

- name: tests, py3.13
- name: py3.13
linux: test
os: ubuntu-latest
python-version: 3.13

- name: Code style checks
python: 3.11
os: ubuntu-latest
linux: codestyle
linux: codestyle

- name: py3.12 with coverage
linux: test
os: ubuntu-latest
python: '3.12'
toxenv: py312-test-cov
toxposargs: --remote-data

cov:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies
run:
pip install pytest pytest-cov pytest-doctestplus pytest-remotedata .

- name: Run tests
run: pytest --cov --cov-branch --cov-report=xml

- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
min_version = 4.0
envlist =
py{310,311,312}-test
py{310,311,312}-test{,-cov}
py10-test-oldestdeps
build_docs

Expand All @@ -17,6 +17,7 @@ envlist =
description =
run tests
oldestdeps: with the oldest supported version of key dependencies
cov: and test coverage

# Pass through the following environment variables which may be needed for the CI
pass_env =
Expand Down Expand Up @@ -52,7 +53,10 @@ commands_pre =
pip freeze

commands =
pytest --pyargs opacity --cov opacity --cov-report xml:coverage.xml --cov-report term-missing {posargs}
pip freeze
!cov: pytest --pyargs opacity {toxinidir}/docs {posargs} --durations=30
cov: pytest --pyargs opacity {toxinidir}/docs --cov opacity --cov-config={toxinidir}/pyproject.toml {posargs} --durations=30
cov: coverage xml -o {toxinidir}/coverage.xml

[testenv:build_docs]
description = invoke sphinx-build to build the HTML docs
Expand Down
Loading