Skip to content

Bump pytest from 8.1.1 to 8.2.0 (#394) #1006

Bump pytest from 8.1.1 to 8.2.0 (#394)

Bump pytest from 8.1.1 to 8.2.0 (#394) #1006

Workflow file for this run

name: CI
on:
push:
branches:
- '**' # run on all branches
pull_request:
branches:
- '**' # run on all branches
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
env:
cache-name: cache-pypi-modules
with:
# pip cache files are stored in `~/.cache/pip` on Linux
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Cache pre-commit packages
uses: actions/cache@v2
env:
cache-name: cache-pre-commit
with:
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux
path: ~/.cache/pre-commit
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: pip install -r requirements/testing.txt
- name: Linter Pydocstyle
run: pydocstyle pyvlx test/*.py *.py examples/*.py
- name: Linter Flake8
run: flake8
- name: Linter Pylint
run: PYTHONPATH=. pylint --rcfile=.pylintrc pyvlx test/*.py *.py examples/*.py
- name: Mypy
run: mypy pyvlx
- name: Tests
run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml
- name: Upload coverage artifact
uses: actions/upload-artifact@v2.2.2
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
coverage:
name: Process test coverage
runs-on: ubuntu-latest
needs: ["build"]
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
env:
cache-name: cache-pypi-modules
with:
# pip cache files are stored in `~/.cache/pip` on Linux
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Cache pre-commit packages
uses: actions/cache@v2
env:
cache-name: cache-pre-commit
with:
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux
path: ~/.cache/pre-commit
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: |
pip install -r requirements/testing.txt
- name: Download all coverage artifacts
uses: actions/download-artifact@v2
- name: Create coverage report
run: |
coverage combine coverage*/.coverage*
coverage report --fail-under=79
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}