Skip to content

Commit

Permalink
Merge pull request #943 from fronzbot/dependabot/pip/pytest-8.2.2
Browse files Browse the repository at this point in the history
Bump pytest from 8.2.1 to 8.2.2
  • Loading branch information
fronzbot authored Jun 7, 2024
2 parents af3fb2e + badec59 commit 8e578ae
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 29 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]

jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform:
- ubuntu-latest
python-version: ['3.11']
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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
- name: Build Wheel
run: |
tox -r -e build
49 changes: 32 additions & 17 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@ 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: Check out code from GitHub
uses: actions/checkout@v4.1.6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -28,16 +25,34 @@ jobs:
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
15 changes: 10 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: [3.11]
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
Expand All @@ -27,7 +27,12 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install tox
- name: Lint
- name: Ruff
run: |
ruff check blinkpy tests blinkapp
- name: Black
run: |
black --check --color --diff blinkpy tests blinkapp
- name: RST-Lint
run: |
tox -r -e lint
rst-lint README.rst CHANGES.rst CONTRIBUTING.rst
16 changes: 10 additions & 6 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,17 +7,17 @@ on:
branches: [ master, dev ]

jobs:
build:
pytest:
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
matrix:
platform:
- ubuntu-latest
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- name: Check out code from GitHub
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -27,7 +27,11 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install tox
pip install .
- name: Tests
run: |
tox -r
python -m pytest \
--timeout=30 \
--durations=10 \
--cov=blinkpy \
--cov-report term-missing
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ruff==0.4.8
black==24.4.2
build==1.2.1
coverage==7.5.3
pytest==8.2.1
pytest==8.2.2
pytest-cov==5.0.0
pytest-sugar==1.0.0
pytest-timeout==2.3.1
Expand Down

0 comments on commit 8e578ae

Please sign in to comment.