Bump pytest from 7.3.2 to 7.4.0 #257
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [main] | |
tags: ['v*'] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
env: | |
LATEST_PY_VERSION: '3.10' | |
COVERAGE_ARGS: '--cov --cov-report=term --cov-report=xml' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: snok/[email protected] | |
with: | |
virtualenvs-in-project: true | |
- name: Install Qt dependencies | |
run: sudo apt-get install -y libegl1 | |
# Cache packages per python version, and reuse until lockfile changes | |
- name: Cache python packages | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install -v -E all | |
# TODO: Need an alternate location for SQLite db | |
# - name: Run CLI smoke test | |
# run: | | |
# source $VENV | |
# naturtag -cdo 45524803 | |
# naturtag -cdt 48978 | |
- name: Run unit tests | |
run: poetry run pytest ${{ env.COVERAGE_ARGS }} test | |
# TODO: Upload coverage report to codecov... once there's actual coverage to report | |
# - name: "Upload coverage report to Codecov" | |
# if: ${{ matrix.python-version == env.LATEST_PY_VERSION }} | |
# uses: codecov/codecov-action@v3 | |
# Run code analysis checks via pre-commit hooks | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.LATEST_PY_VERSION }} | |
- name: Run style checks & linting | |
uses: pre-commit/[email protected] | |
- name: Scan dependencies for known vulnerabilities | |
uses: pypa/[email protected] | |
with: | |
vulnerability-service: osv | |
ignore-vulns: PYSEC-2022-43012 # older setuptools used by the action itself |