Skip to content

Commit

Permalink
remove comments from coverage.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
mihrab34 committed Jul 12, 2024
1 parent 1971eeb commit 5010e92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# .github/workflows/ci.yml
name: CI

on:
Expand All @@ -15,14 +14,9 @@ jobs:
matrix:
python-version: [ 3.8, 3.9, "3.10", "3.11" ]
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
uses:

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -43,7 +37,7 @@ jobs:
poetry config virtualenvs.path ~/.virtualenvs3.11
- name: Install dependencies
run: poetry install -E minify
run: poetry install

- name: Launch tests & generate report
run: poetry run coverage run -m pytest
Expand All @@ -58,7 +52,5 @@ jobs:
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
name: python-coverage-comment-action
# If you use a different name, update COMMENT_FILENAME accordingly
path: python-coverage-comment-action.txt
18 changes: 8 additions & 10 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ on:
jobs:
coverage:
runs-on: ubuntu-latest

if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
permissions:
pull-requests: write
contents: write
actions: read
steps:
- uses: actions/checkout@v3

- name: Download coverage report
uses: actions/download-artifact@v3
with:
name: coverage-report

- name: Comment Coverage
- name: Post comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
test-command: poetry run pytest --cov=your_module --cov-report=xml

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}

0 comments on commit 5010e92

Please sign in to comment.