Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GHA workflows so tests run on all OSs #167

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ jobs:
create-args: python=${{ matrix.python-version }}
cache-environment: true
micromamba-version: 1.5.6-0
- name: Run full test suite on MacOS and Linux
- name: Run test suite with coverage on Linux & Python 3.12
shell: bash -l {0}
run: |
micromamba activate template_project
pytest -v --cov=./ --cov-report=xml
if: runner.os != 'Windows'
- name: Run test suite except for pytask build on Windows
shell: bash -l {0}
run: |
micromamba activate template_project
pytest -v -k "not pytask"
if: runner.os == 'Windows'
if: runner.os == 'Linux' && matrix.python-version == '3.12'
- name: Upload coverage reports
if: runner.os == 'Linux' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v3
- name: Run test suite
shell: bash -l {0}
run: |
micromamba activate template_project
pytest -v
if: runner.os != 'Linux' || matrix.python-version != '3.12'
1 change: 1 addition & 0 deletions tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ def test_pytask_build(monkeypatch, tmp_path):
session = pytask.build(
config=ROOT / "pyproject.toml",
force=True,
s=True,
)
assert session.exit_code == ExitCode.OK
Loading