Skip to content

Commit

Permalink
Update test.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinderVosDeWael committed Dec 13, 2023
1 parent 2215fb4 commit e5b541d
Showing 1 changed file with 5 additions and 43 deletions.
48 changes: 5 additions & 43 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 .

0 comments on commit e5b541d

Please sign in to comment.