Skip to content

Commit

Permalink
Test new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesonielfa committed Jul 19, 2024
1 parent 03cdd42 commit 4ca9e45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@ jobs:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.9
- name: Update Coverage Badge
# GitHub actions: default branch variable
# Disable as of now to test the action
# if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: we-cli/coverage-badge-action@main
- name: Update and push coverage badge
#if: github.ref == 'refs/heads/main'
run: |
pip install genbadge[coverage]
genbadge -i coverage.xml
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git clone --single-branch --branch gh-pages https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages
mv coverage-badge.svg gh-pages/badges/coverage.svg
cd gh-pages
git add badges/coverage.svg
git commit -m 'Update coverage badge'
git push origin gh-pages
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source = "src"

[tool.pytest.ini_options]
testpaths = ["./tests"]
addopts = "--cov=nuclia_eval --cov-report=xml --cov-report term --cov-report json"
addopts = "--cov=nuclia_eval --cov-report=xml --cov-report term"

[tool.mypy]
ignore_missing_imports = true
Expand Down

0 comments on commit 4ca9e45

Please sign in to comment.