Enables E2E testing #1
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: E2E Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [labeled] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| e2e: | |
| if: > | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'pull_request' && github.event.label.name == 'run-e2e') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: ${{ secrets.WIF_PROVIDER }} | |
| service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }} | |
| - name: Set up gcloud | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Get GKE credentials | |
| uses: google-github-actions/get-gke-credentials@v2 | |
| with: | |
| cluster_name: ${{ secrets.GKE_CLUSTER }} | |
| location: ${{ secrets.GKE_ZONE }} | |
| project_id: ${{ secrets.GCP_PROJECT }} | |
| - name: Install dependencies | |
| run: pip install -e ".[test,cli]" | |
| - name: Run E2E tests | |
| env: | |
| E2E_TESTS: "1" | |
| KERAS_REMOTE_PROJECT: ${{ secrets.GCP_PROJECT }} | |
| KERAS_REMOTE_ZONE: ${{ secrets.GKE_ZONE }} | |
| KERAS_REMOTE_GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} | |
| run: python -m unittest discover -s tests/e2e -p "test_*.py" -v |