Add integration testing for new key versioning support #124
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: Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
integration: | |
name: Integration testing | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
backend: ["vault"] | |
py_version: ["3.10", "3.11", "3.12", "3.13"] | |
dependencies: ["constrained", "unconstrained"] | |
include: | |
- backend: bao | |
py_version: 3.12 | |
dependencies: unconstrained | |
env: | |
BACKEND: ${{ matrix.backend }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Docker Compose .env file | |
run: .github/helpers/gen-compose-env > integration/.env | |
env: | |
TEST_APP_KEY_B64: ${{ secrets.TEST_APP_KEY_B64 }} | |
- name: Build test image | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" build --build-arg pyver="${py_version}" --build-arg pip_extra="${pip_extra}" testrunner | |
env: | |
pip_extra: ${{ matrix.dependencies == 'constrained' && '--constraint=/src/constraints.txt' || '' }} | |
py_version: ${{ matrix.py_version }} | |
- name: Bring up server | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" up --wait --detach "${BACKEND}-server" | |
- name: Configure server | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" run --no-deps "${BACKEND}-setup" | |
- name: Import App key | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" run --no-deps testrunner import | |
- name: Issue Access Token | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" run --no-deps testrunner issue | |
- name: Issue scoped Access Token | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" run --no-deps testrunner issue-scoped | |
- name: Test different key versions | |
run: docker compose -f "integration/${BACKEND}-compose.yaml" run --no-deps testrunner key-versioning |