Skip to content

Commit

Permalink
ci: switch to coverallsapp/github-action
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed Jul 18, 2024
1 parent 9f419b8 commit 3124b0e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 119 deletions.
42 changes: 5 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,41 +80,9 @@ jobs:
with:
python-version: '3.11'
cache: pip
- name: Install python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade hatch
- name: Install Hatch
uses: pypa/hatch@a3c83ab3d481fbc2dc91dd0088628817488dd1d5
- name: Run test suite with coverage
run: hatch run cov-ci
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
retention-days: 1
path: pytest-junit.xml
- name: Upload coverage results
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-results
retention-days: 1
path: pytest-cobertura.xml
- run: rm ./reports/coverage/.gitignore
- name: Generate coverage badge
if: github.ref == 'refs/heads/master'
run: hatch run cov-badge
- name: Deploy reports to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e # v4.5.0
with:
folder: ./reports

event_file:
runs-on: ubuntu-22.04
steps:
- uses: actions/upload-artifact@v4
with:
name: event-file
retention-days: 1
path: ${{ github.event_path }}
run: hatch run cov
- name: Upload coverage data to coveralls.io
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0
78 changes: 0 additions & 78 deletions .github/workflows/reports.yml

This file was deleted.

5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ version = "3.2.0"

[project.optional-dependencies]
dev = [
"fuji[lint]",
"fuji[testing]"
"fuji[lint,testing]"
]
docs = [
"myst-parser~=2.0",
Expand All @@ -81,7 +80,6 @@ report = [
"jupyter~=1.0"
]
testing = [
"genbadge[coverage]~=1.1",
"pytest~=8.0",
"pytest-cov~=5.0",
"pytest-randomly~=3.15",
Expand Down Expand Up @@ -125,7 +123,6 @@ features = [

[tool.hatch.envs.default.scripts]
cov = "pytest --cov {args}"
cov-badge = "genbadge coverage --input-file=pytest-cobertura.xml --output-file=./reports/coverage/coveragebadge.svg"
cov-ci = "pytest --cov --junitxml=pytest-junit.xml --cov-report=xml:pytest-cobertura.xml --cov-report=html:./reports/coverage/ {args}"
lint = "pre-commit run --all-files --color=always {args}"
test = "pytest {args}"
Expand Down

0 comments on commit 3124b0e

Please sign in to comment.