Compile update_paratranz with poetry #72
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Tests | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v3 | |
- name: Install the project dependencies | |
run: poetry install | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 . --count --max-line-length=119 --statistics | |
- name: Coverage with pytest | |
run: | | |
poetry run coverage run --omit "tests/*.py" -m pytest ./tests/ --junitxml=./report.xml -s | |
poetry run coverage report | |
poetry run coverage xml | |
# genbadge tests -i ./report.xml -s -o ./tests.svg | |
# genbadge coverage -i ./coverage.xml -s -o ./coverage.svg | |
# - name: Setup node | |
# uses: actions/setup-node@v1 | |
# - name: Upload badge to GitHub | |
# uses: LasyIsLazy/github-upload-action@v0.1.0 | |
# with: | |
# access-token: ${{ secrets.ACCESS_TOKEN }} | |
# file-path: coverage.svg | |
# owner: NicolasGrosjean | |
# repo: Paradox_localization_utils | |
# branch-name: actions | |
# remote-dir: badges | |
# commit-message: Update coverage badge | |