diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b1a2c2..fc3d327 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,3 +26,27 @@ jobs: - name: Run pre-commit steps run: | pre-commit run --all-files + run-tests: + name: tests via pytest + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -e .[dev,audit] + - name: Run tests + run: | + pytest . + - name: Upload coverage + uses: actions/upload-artifact@v4 + with: + name: coverage-data + path: coverage/coverage.xml + if-no-files-found: error diff --git a/setup.cfg b/setup.cfg index 52cc96e..135110e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -71,7 +71,7 @@ docs = [tool:pytest] -addopts = --cov-config=setup.cfg --cov-report=html --cov=seismometer +addopts = --cov-config=setup.cfg --cov=seismometer --cov-report=term --cov-report=html --cov-report=xml:coverage/coverage.xml testpaths = tests json_report = coverage/test-report.json jsonapi = True