From a3eb59c81f46a70c02e216ec9528f6d0e1594cd1 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Fri, 7 Jun 2024 14:44:51 -0400 Subject: [PATCH] Use upload and download to hopefully fix coverage stupidity --- .github/workflows/coverage.yml | 55 ++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8c2f71cd..81f1b4cf 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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/upload-artifact@v4.3.3 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/checkout@v4.1.6 + - name: Download all coverage artifacts + uses: actions/download-artifact@v4.1.7 + with: + name: coverage-${{ matrix.python-version }} + path: coverage.xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4.4.1 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + name: blinkpy