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

Reactivate coverage badge action #188

Closed
jobrachem opened this issue Apr 24, 2024 · 1 comment
Closed

Reactivate coverage badge action #188

jobrachem opened this issue Apr 24, 2024 · 1 comment

Comments

@jobrachem
Copy link
Contributor

jobrachem commented Apr 24, 2024

Once the following issue is fixed, we can reactivate the coverage badge action:

Then, the following code can be added again to the pytest action:

      - name: Create coverage badge
        uses: tj-actions/coverage-badge-py@v2
        with:
          output: coverage-new.svg

      - name: Commit coverage.svg
        run: |
          git config --local user.name "github-actions[bot]"
          git config --local user.email "github-actions[bot]@users.noreply.github.com"
          git ls-remote | grep refs/heads/pytest-cov && git remote set-branches --add origin pytest-cov && git fetch
          git switch pytest-cov || git switch --orphan pytest-cov
          mv coverage-new.svg coverage.svg
          git add coverage.svg
          git diff --staged --quiet || git commit -m "Updated coverage.svg"

      - name: Push coverage.svg
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: pytest-cov
@jobrachem
Copy link
Contributor Author

I reactivated the coverage badge, and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant