Refactor floating point comparison in Q-learning tests #22
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: Check format | |
run: | | |
poetry run task check_format | |
- name: Check lint | |
run: | | |
poetry run task lint | |
- name: Check mypy | |
run: poetry run task mypy | |
- name: Run unittests with coverage check | |
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 |