Skip to content

Bump cryptography from 41.0.6 to 42.0.2 #263

Bump cryptography from 41.0.6 to 42.0.2

Bump cryptography from 41.0.6 to 42.0.2 #263

Workflow file for this run

# This workflow will check for changed files, install Python dependencies and
# run tests 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: Python Tests
on:
# run on each push to every branch of the repository but only on
# pull requests to the 'master' and 'branch-*' branches
push:
pull_request:
branches:
- 'master'
- 'branch-*'
jobs:
pre_check:
name: 'Check for code changes'
runs-on: ubuntu-latest
outputs:
run_tests: ${{ steps.changes.outputs.python_test}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: dorny/paths-filter@v2
id: changes
with:
filters: .github/filters.yml
list-files: 'json'
build:
name: 'Run tests with Python'
needs: pre_check
if: needs.pre_check.outputs.run_tests == 'true'
# we need to fix the ubuntu version until we drop Python 2.7 and 3.6
runs-on: ubuntu-20.04
strategy:
# don't cancel running matrix tests when one test fails
fail-fast: false
matrix:
# current supported Python versions (and 2.7 and 3.6 for legacy support)
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
with:
# clone submodules as well
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip installation
uses: actions/cache@v3
id: pip-cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-py_${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-py_${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
# create the virtual environment
run: |
python -m pip install --upgrade pip setuptools
pip install -r tests/requirements.txt
- name: Test with pytest
id: pytest_run
run: |
pip freeze
python -b -m pytest -v --cov=privacyidea --cov-report=xml tests/
env:
# silence some deprecation warnings
PYTHONWARNINGS: "ignore:the imp module is deprecated in favour of importlib:DeprecationWarning,ignore:Please use assertRegex instead:DeprecationWarning"
- name: Codecov upload
if: ${{ steps.pytest_run.outcome == 'success' }}
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml