Merge pull request #7 from oej/lint #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Python tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9.19"] | |
steps: | |
- uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Europe/Berlin" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install test dependencies | |
run: pip install pytest pytest-md pytest-emoji pytest-cov | |
- name: Install app dependencies | |
run: pip install urnparse packageurl-python | |
- uses: pavelzw/pytest-action@v2 | |
with: | |
emoji: false | |
verbose: false | |
job-summary: true | |
custom-arguments: "--cov=./ \ | |
--cov-report html \ | |
--cov-report term \ | |
--cov-report xml \ | |
--junit-xml=pytest-report.xml \ | |
-s -v " | |
- run: mkdir -p artifact | |
- run: mv coverage.xml artifact/coverage.xml | |
- run: ls -l artifact/* | |
- uses: actions/upload-artifact@master | |
with: | |
name: tei-coverage | |
path: artifact | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@master | |
with: | |
name: tei-coverage | |
path: artifact | |
- run: cat artifact/coverage.xml | |
- name: Get Cover | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: artifact/coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} |