Skip to content

Commit

Permalink
Add code coverage to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanBryan51 committed Jul 13, 2023
1 parent 5722fb3 commit 26b7812
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ jobs:
environment-file: .conda/benchcab-dev.yaml
- name: Test with pytest
run: |
TMPDIR=${{ runner.temp }} pytest
coverage run -m pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
files: ./.coverage
4 changes: 2 additions & 2 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Helper functions for `pytest`."""

import os
import tempfile
from pathlib import Path

TMP_DIR = Path(os.environ["TMPDIR"], "benchcab_tests")
TMP_DIR = Path(tempfile.mkdtemp(prefix="benchcab_tests"))


def make_barebones_config() -> dict:
Expand Down

0 comments on commit 26b7812

Please sign in to comment.