Skip to content

Commit

Permalink
Use upload and download to hopefully fix coverage stupidity
Browse files Browse the repository at this point in the history
  • Loading branch information
fronzbot authored Jun 7, 2024
1 parent 3dea4e7 commit a3eb59c
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,39 @@ on:

jobs:
coverage:
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
platform:
- ubuntu-latest
python-version: ['3.11']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install tox
pip install codecov
- name: Test
- name: Run Coverage
run: |
tox -r -e cov
- name: Codecov
uses: codecov/codecov-action@v3
- name: Upload coverage
uses: actions/[email protected]
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage.xml
flags: unittests # optional
name: blinkpy
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
name: coverage-${{ matrix.python-version }}
path: coverage.xml
overwrite: true
upload-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
needs:
- coverage
timeout-minutes: 10
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Download all coverage artifacts
uses: actions/[email protected]
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
name: blinkpy

0 comments on commit a3eb59c

Please sign in to comment.