Skip to content

Commit

Permalink
Try to fix codecov upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelRosier committed Oct 9, 2024
1 parent 1cdd314 commit cbbcd55
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest] #, windows-latest, macos-latest]
python-version: ["3.10"] #, "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,23 +26,25 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies

- 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
python -m poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ matrix.os }}-${{matrix.python-version}}-venv-${{ hashFiles('**/poetry.lock') }}
- 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
python -m poetry install
- name: Test with pytest
run: |
python -m poetry run coverage run --source=panoptica -m pytest
- name: Upload results to Codecov
# 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
with:
token: ${{ secrets.CODECOV_TOKEN }}
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
pip install codecov-cli
codecovcli --verbose upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'job-name'-${{ github.run_id }} -f .coverage

0 comments on commit cbbcd55

Please sign in to comment.