Refactor base classes for better encapsulation and diversity #15
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: CI | |
on: | |
push: | |
branches: | |
- main | |
permissions: write-all | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11.5 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.5" | |
- name: Setup Poetry | |
uses: abatilo/actions-poetry@v2.1.6 | |
with: | |
poetry-version: "1.6.1" | |
- name: Install dependencies | |
run: poetry install | |
- name: Mypy | |
run: poetry run task mypy | |
- name: Ruff | |
run: | | |
poetry run task lint | |
- name: pytest coverage | |
run: | | |
poetry run pytest --cov --junitxml=pytest.xml --cov-report=term-missing:skip-covered | tee pytest-coverage.txt | |
- name: Create Coverage Comment | |
id: coverageComment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: pytest-coverage.txt | |
junitxml-path: ./pytest.xml | |
- name: Create Coverage Badge | |
uses: schneegans/dynamic-badges-action@v1.7.0 | |
with: | |
auth: ${{ secrets.BADGE_GIST }} | |
gistID: 39e7ad55fb0943a43d055782915a2024 | |
filename: pytest-coverage-comment.json | |
label: Coverage | |
message: ${{ steps.coverageComment.outputs.coverage }} | |
color: ${{ steps.coverageComment.outputs.color }} | |
namedLogo: python |