Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix codecov upload #150

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,20 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
cache: "pip"

- name: Install dependencies
- name: Configure poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m poetry install
- name: Lint with flake8
- name: Install dependencies
run: |
# stop the build if there are Python syntax errors or undefined names
python -m poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
python -m poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
python -m poetry install
- name: Test with pytest and create coverage report
run: |
python -m poetry run coverage run --source=panoptica -m pytest
- name: Upload results to Codecov
python -m poetry run coverage xml
- name: Upload coverage results to Codecov (Only on merge to main)
# Only upload to Codecov after a merge to the main branch
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: codecov/codecov-action@v4
Expand Down