Skip to content

Validate plugins in lookup functions #29

Validate plugins in lookup functions

Validate plugins in lookup functions #29

Workflow file for this run

name: Tests
on:
- push
- pull_request
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: |
pyproject.toml
- name: Install dependencies
run: uv tool install --with "tox-uv,tox-gh-actions" tox
- name: Prepare test environment
run: |
cp tests/data/credentials_fake.json credentials.json
echo "EDUTAP_WALLET_GOOGLE_ISSUER_ID=1234567890123456789" > .env
- name: Test with tox
run: tox -- -m "not integration"
integration-tests:
needs: unit-tests
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
environment:
name: Integration-Tests
url: https://pypi.org/edutap-eu/edutap.wallet_google/
steps:
- uses: actions/checkout@v4
- name: Check for changed models or API
id: changed-models-or-api
uses: tj-actions/changed-files@v45
with:
files: |
src/edutap/wallet_google/models/**
src/edutap/wallet_google/api.py
- name: Install the latest version of uv
if: steps.changed-models-or-api.outputs.any_changed == 'true'
uses: astral-sh/setup-uv@v4
with:
python-version: '3.13'
enable-cache: true
cache-dependency-glob: |
pyproject.toml
- name: Install dependencies
if: steps.changed-models-or-api.outputs.any_changed == 'true'
run: uv tool install --with "tox-uv,tox-gh-actions" tox
- name: Prepare test environment
if: steps.changed-models-or-api.outputs.any_changed == 'true'
run: |
echo "${{ secrets.SERVICE_ACCOUNT_JSON }}" > /tmp/edutap-wallet-google-credentials.json
echo "EDUTAP_WALLET_GOOGLE_ISSUER_ID=${{ secrets.ISSUER_ID }}" > .env
echo "EDUTAP_WALLET_GOOGLE_CREDENTIALS_FILE=/tmp/edutap-wallet-google-credentials.json" >> .env
echo "EDUTAP_WALLET_GOOGLE_INTEGRATION_TEST_PREFIX=${{ github.run_id }}" >> .env
- name: Test with tox
if: steps.changed-models-or-api.outputs.any_changed == 'true'
run: tox -- -m integration