github actions test #665
Workflow file for this run
This file contains hidden or 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: Unit Tests | |
on: [push, pull_request_target] | |
jobs: | |
test: | |
name: Test (Python ${{ matrix.python-version }}) | |
runs-on: ubuntu-latest | |
# always run on push events | |
# only run on pull_request_target event when pull request pulls from fork repository | |
if: > | |
github.event_name == 'push' || | |
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10","3.13"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip & Install Dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install --upgrade cffi cryptography | |
pip install --upgrade -r requirements.txt | |
pip install -e .[dev] | |
- name: Workaround for cffi ImportError | |
run: | | |
export LD_PRELOAD=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")/libpython3.13.so | |
pytest -v | |
- run: pytest -v | |
examples: | |
name: Check Examples | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name == 'push' || | |
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.13 | |
- name: Upgrade pip and install dependencies | |
run: | | |
pip install --upgrade pip setuptools wheel | |
pip install --upgrade cffi cryptography | |
pip install --upgrade -r requirements.txt | |
- run: pip install --upgrade setuptools | |
- run: pushd examples/aml && pip install -r requirements.txt && popd | |
- run: pushd examples/yoti_example_django && pip install --upgrade pip && pip install -r requirements.txt && popd | |
- run: pushd examples/yoti_example_flask && pip install -r requirements.txt && popd | |
- run: pushd examples/doc_scan && pip install -r requirements.txt && popd |