Skip to content

Commit

Permalink
Merge tests and coverage workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fronzbot authored Jun 7, 2024
1 parent e662044 commit da65f3c
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: tests

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ master, dev ]

jobs:
build:
pytest:
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
Expand All @@ -17,7 +17,8 @@ jobs:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -31,3 +32,32 @@ jobs:
- name: Tests
run: |
tox -r
- name: Upload coverage
uses: actions/upload-artifact$v4.3.3
with:
name: coverage-${{ matrix.python-version }}-${{ matrix.platform }}
path: coverage.xml
overwrite: true
coverage:
runs-on: ${{ matrix.platform }}
matrix:
platform:
- ubuntu-latest
python-version: ['3.11']
needs:
- pytest
timeout-minutes: 10
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Download all coverage artifacts
uses: actions/[email protected]
with:
path: coverage-${{ matrix.python-version }}-${{ matrix.platform }}
- 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 da65f3c

Please sign in to comment.