-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (54 loc) · 1.8 KB
/
e2e-tests.yaml
File metadata and controls
65 lines (54 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: E2E Tests
on:
workflow_dispatch:
pull_request:
types: [labeled]
permissions:
contents: read
id-token: write
pull-requests: 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: Remove run-e2e label
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'run-e2e'
});
- 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