diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b739672..c90537d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,60 +15,22 @@ jobs: run: pipx install poetry - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version-file: pyproject.toml cache: poetry - name: Install dependencies run: | poetry install - name: Run tests id: run-tests - continue-on-error: true run: > poetry run pytest \ --junitxml=pytest.xml \ --cov-report=term-missing:skip-covered \ --cov-report=xml:coverage.xml \ --cov=src tests \ - > ./pytest-coverage.txt; - cat ./pytest-coverage.txt; - - name: Upload pytest coverage artifacts. - uses: actions/upload-artifact@v3 - with: - name: pytest-coverage - path: ./pytest-coverage.txt - - name: Upload pytest junitxml artifacts. - uses: actions/upload-artifact@v3 - with: - name: pytest-junitxml - path: pytest.xml - - name: Checking testing success. - if: steps.run-tests.outcome != 'success' - run: exit 1; - - coverage: - runs-on: ubuntu-latest - needs: unit - if: success() || failure() - permissions: - contents: read - pull-requests: write - steps: - - name: Get pytest artifacts - uses: actions/download-artifact@v3 - with: - name: pytest-coverage - - name: Get pytest junitxml artifacts - uses: actions/download-artifact@v3 - with: - name: pytest-junitxml - - name: Pytest coverage comment - if: github.event_name == 'pull_request' - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-coverage-path: ./pytest-coverage.txt - junitxml-path: ./pytest.xml + --log-level=DEBUG \ + --verbose - name: Upload coverage to Codecov - if: success() || failure() uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -87,8 +49,8 @@ jobs: run: pipx install poetry - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version-file: pyproject.toml cache: poetry - run: | poetry install - poetry run mypy . + poetry run mypy . \ No newline at end of file