-
Notifications
You must be signed in to change notification settings - Fork 61
115 lines (102 loc) · 3.51 KB
/
run-test-suite.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: E2E-QA-and-Deployment
on:
workflow_dispatch:
inputs:
nightly_binaries:
description: 'Testing with nightly binaries :'
type: boolean
default: false
required: false
# push:
# branches:
# - 'main'
# schedule:
# - cron: '0 0 * * *'
permissions:
actions: read
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
start-vm:
runs-on: ubuntu-latest
if: always() # Run this job always, regardless of the status of run-test-basics
steps:
- name: Checkout Demos🛎
uses: actions/checkout@v2
with:
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Install clients for GCP/Mongo
run: |
pip3 install pymongo google-api-python-client paramiko
- name: Start GPU VM
run: |
cd demos/tests/auth
mkdir -p ~/.ssh
touch ~/.ssh/id_rsa
echo -n "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod +x ~/.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" "demos-tests"
run-test-example-demos:
needs: start-vm
name: examples-and-demos
uses: ./.github/workflows/_demo-test.yml
secrets: inherit
with:
nightly_binaries: ${{ github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.nightly_binaries) || false}}
stop-vm:
needs: run-test-example-demos
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 for GCP/Mongo
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" "demos-tests"
run-test-basic-demos:
name: learn-the-basics
uses: ./.github/workflows/_basic-test.yml
secrets: inherit
with:
nightly_binaries: ${{ github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.nightly_binaries) || false}}
run-readme-tests:
name: run-readme-tests
runs-on: ubuntu-latest
env:
VERSION: ${{ fromJson(github.event.inputs.nightly_binaries) && 'nightly' || 'main' }}
steps:
- name: Checkout Demos🛎
uses: actions/checkout@v4
with:
repository: ivy-llc/demos
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Checkout Ivy🛎
uses: actions/checkout@v4
with:
repository: ivy-llc/ivy
ref: ${{ env.VERSION }}
path: ivy
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Run README tests
run: |
docker run -v "$(pwd)"/demos:/ivy/demos -v "$(pwd)"/ivy:/ivy/ivy ivyllc/ivy:latest demos/tests/test_demos.sh ${{ secrets.USER_API_KEY }} readme ${{ inputs.nightly_binaries }} false