Skip to content

dev: fix werkzeug vulnerabilities (#434) #134

dev: fix werkzeug vulnerabilities (#434)

dev: fix werkzeug vulnerabilities (#434) #134

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and Test
# Run workflow for pushes to main and version branches, or pull requests
on:
push:
branches:
- main
- 'v[0-9]+.[0-9]+'
pull_request:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.8"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r tests/requirements.txt
- name: Test with pytest without flake8 (for pypy)
if: startsWith(matrix.python-version, 'pypy')
# flake8 runs very slowly with pypy, so skip it (see #146)
run: pytest -o 'flake8-ignore=*.py ALL'
- name: Test with pytest
if: startsWith(matrix.python-version, 'pypy') != true
run: pytest
- name: Generate coverage report
run: coverage xml
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true