Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #412

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #412

Workflow file for this run

---
name: continuous-integration
on: [push, pull_request]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- uses: pre-commit/[email protected]
test-package:
needs: [pre-commit]
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
which python
python -m pip install -e .[tests]
python -m pip freeze
- name: Run tests
run: |
pytest -v
- name: Make coverage
if: ${{ matrix.python-version == '3.12' }}
run: |
pytest --junitxml=pytest.xml --cov=data2rdf | tee pytest-coverage.txt
- name: Pytest coverage comment on pull request
if: ${{ github.event_name == 'pull_request' && matrix.python-version == '3.12'}}
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: Pytest coverage comment on push
if: ${{ github.event_name == 'push' && matrix.python-version == '3.12' && github.ref == 'refs/heads/main'}}
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
hide-comment: true
- name: Update Readme with Coverage Html
if: ${{ github.event_name == 'push' && matrix.python-version == '3.12' && github.ref == 'refs/heads/main'}}
run: |
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.coverageHtml }}\n<!-- Pytest Coverage Comment:End -->' ./README.md
- name: Commit & Push changes to Readme
if: ${{ github.event_name == 'push' && matrix.python-version == '3.12' && github.ref == 'refs/heads/main'}}
uses: actions-js/push@master
with:
message: Update coverage on Readme
github_token: ${{ secrets.GITHUB_TOKEN }}