Merge pull request #129 from FredHutch/2-task-level-remote-input-loca… #494
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: API Tests | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- test-api | |
pull_request: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [dispatch-event] | |
jobs: | |
api-tests: | |
if: ${{ ! github.event.pull_request.head.repo.fork }} | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v6 | |
with: | |
version: "0.7.12" | |
python-version: 3.13.3 | |
- name: Install dependencies | |
run: uv sync --all-extras | |
- name: Dispatch event information | |
if: ${{ github.event_name == 'repository_dispatch' }} | |
run: | | |
echo PROOF-API SHA: ${{ github.event.client_payload.sha }} | |
echo PROOF-API REF: ${{ github.event.client_payload.ref }} | |
- name: Load secrets | |
id: load-secrets | |
uses: 1password/load-secrets-action@v2 | |
with: | |
export-env: true | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
PROOF_API_TOKEN_DEV: "op://PROOF/PROOF_Test_User/dev token" | |
PATH_ROOTS: "op://PROOF/PROOF_PATH_ROOTS/credential" | |
- name: Run tests USING cached vcr cassettes | |
if: ${{ github.event_name != 'repository_dispatch' }} | |
run: make test_api_cached | |
- name: Run tests IGNORING cached vcr cassettes | |
if: ${{ github.event_name == 'repository_dispatch' }} | |
run: make test_api_rewrite |