Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
f-peverali committed Oct 15, 2024
1 parent 86a6709 commit 4701173
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test_python_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ jobs:
- name: Run tests
id: run_tests
run: |
python -m unittest discover -s scripts -p 'test*.py'
python -m unittest discover -s scripts -p 'test_update_index'
continue-on-error: true

- name: Generate coverage report
run: |
pip install coverage
coverage run -m unittest discover -s scripts -p 'test*.py'
coverage run -m unittest discover -s scripts -p 'test_update_index'
coverage xml -o coverage/coverage.xml
coverage report
- name: Post test results as comment
if: always()
uses: actions/github-script@v4
Expand All @@ -50,8 +49,9 @@ jobs:
const fs = require('fs');
const results = fs.readFileSync('coverage/coverage.xml', 'utf8');
const comment = `## Test Results\n\n\`\`\`xml\n${results}\n\`\`\``;
const issue_number = context.payload.pull_request ? context.payload.pull_request.number : context.issue.number;
github.rest.issues.createComment({
issue_number: context.issue.number,
issue_number: issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
Expand Down

0 comments on commit 4701173

Please sign in to comment.