-
Notifications
You must be signed in to change notification settings - Fork 61
70 lines (60 loc) · 1.92 KB
/
run-demo-tests.yml
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
66
67
68
name: gcp-auth-script
on:
push:
branches:
- ci-testing
- main
- release/* #ToDo: add a release branch
pull_request:
workflow_dispatch:
jobs:
run-test-basic-demos:
name: learn-the-basics
uses: ./.github/workflows/_basic-test.yml
activate-vm:
needs: run-test-basics
runs-on: ubuntu-latest
steps:
- name: Checkout Demos🛎
uses: actions/checkout@v2
with:
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Install clients
run: |
pip3 install pymongo google-api-python-client paramiko==2.7.1
- name: Start GPU VM
run: |
cd demos/tests/auth
mkdir -p ~/.ssh
touch ~/.ssh/id_rsa
echo "${{ secrets.SSH_KEY }}" > $HOME/.ssh/id_rsa
chmod 600 $HOME/.ssh/id_rsa
python3 db_auth.py ${{ secrets.DB_ENDPOINT }} ${{ secrets.DB_OBJ_ID }}
python3 vm_auth.py ${{ secrets.SSH_USERNAME }} ${{ secrets.SSH_PASSPHRASE }} "false"
run-test-example-demos:
needs: activate-vm
name: examples-and-demos
uses: ./.github/workflows/_demo-test.yml
deactivate-vm:
needs: run-test
runs-on: ubuntu-latest
if: always() # Run this job always, regardless of the status of run-test
steps:
- name: Checkout Demos🛎
uses: actions/checkout@v2
with:
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Install clients
run: |
pip3 install pymongo google-api-python-client paramiko==2.7.1
- name: Stop GPU VM
run: |
cd demos/tests/auth
python3 db_auth.py ${{ secrets.DB_ENDPOINT }} ${{ secrets.DB_OBJ_ID }}
python3 vm_auth.py ${{ secrets.SSH_USERNAME }} ${{ secrets.SSH_PASSPHRASE }} "true"