Skip to content

Commit f4b03f0

Browse files
authored
Merge pull request #74 from anandhu-eng/dev
Add tests for find repo
2 parents fcff91b + dab459a commit f4b03f0

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

.github/workflows/test-mlc-core-actions.yaml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,15 @@ jobs:
6262
exit 1
6363
fi
6464
65+
- name: Test 2 - find repo
66+
run: |
67+
mlc find repo anandhu-eng@mlperf-automations
68+
mlc find repo https://github.com/mlcommons/mlperf-automations.git
69+
mlc find repo 9cf241afa6074c89
70+
mlc find repo mlcommons@mlperf-automations
71+
mlc find repo mlcommons@mlperf-automations,9cf241afa6074c89
6572
66-
- name: Test 2 - pull repo - Test conflicting repo scenario
73+
- name: Test 3 - pull repo - Test conflicting repo scenario
6774
run: |
6875
GH_MLC_REPO_PATH="${HOME}/MLC/repos/mlcommons@mlperf-automations"
6976
GH_MLC_REPO_JSON_PATH="${HOME}/MLC/repos/repos.json"
@@ -91,11 +98,11 @@ jobs:
9198
fi
9299
mlc pull repo
93100
94-
- name: Test 3 - list repo - List the existing repositories
101+
- name: Test 4 - list repo - List the existing repositories
95102
run: |
96103
mlc list repo
97104
98-
- name: Test 4 - rm repo - Remove the forked mlperf-automation repo
105+
- name: Test 5 - rm repo - Remove the forked mlperf-automation repo
99106
run: |
100107
GH_MLC_REPO_PATH_FORK="${HOME}/MLC/repos/anandhu-eng@mlperf-automations"
101108
mlc rm repo anandhu-eng@mlperf-automations
@@ -104,76 +111,76 @@ jobs:
104111
exit 1
105112
fi
106113
107-
- name: Test 5 - find cache - Cache not present
114+
- name: Test 6 - find cache - Cache not present
108115
run: |
109116
mlc find cache --tags=detect,os 2>&1 | tee test5.log
110117
if ! grep -q "No cache entry found for the specified input:" test5.log; then
111118
exit 1
112119
fi
113120
114-
- name: Test 6 - run script - Output being used for testing mlc cache
121+
- name: Test 7 - run script - Output being used for testing mlc cache
115122
run: |
116123
mlc run script --tags=get,imagenet-aux --quiet
117124
mlc run script --tags=get,imagenet-aux,_from.dropbox --quiet
118125
119-
- name: Test 7 - find cache - More than one cache present
126+
- name: Test 8 - find cache - More than one cache present
120127
run: |
121128
mlc search cache --tags=get,imagenet-aux 2>&1 | tee test7.log
122129
if grep -q "No cache entry found for the specified tags:" test7.log; then
123130
exit 1
124131
fi
125132
126-
- name: Test 8 - show cache - More than one cache present
133+
- name: Test 9 - show cache - More than one cache present
127134
run: |
128135
mlc show cache --tags=get,imagenet-aux 2>&1 | tee test7.log
129136
130-
- name: Test 9 - rm cache - More than one cache present
137+
- name: Test 10 - rm cache - More than one cache present
131138
run: |
132139
mlc rm cache --tags=get,imagenet-aux 2>&1 --all | tee test7.log
133140
134-
- name: Test 10 - cp script - Copy mlc script
141+
- name: Test 11 - cp script - Copy mlc script
135142
run: |
136143
mlc cp script detect-os my-os-detect
137144
138-
- name: Test 11 - add repo - Add a new MLC repo
145+
- name: Test 12 - add repo - Add a new MLC repo
139146
run: |
140147
mlc add repo my-new-repo
141148
mlc add repo https://github.com/mlcommons/inference
142149
mlc add repo https://mygit.com/myrepo
143150
144-
- name: Test 12 - rm repo where we have a corrupt entry
151+
- name: Test 13 - rm repo where we have a corrupt entry
145152
run: |
146153
rm -r $HOME/MLC/repos/mlcommons@mlperf-automations
147154
mlc rm repo mlcommons@mlperf-automations
148155
mlc pull repo mlcommons@mlperf-automations --branch=dev
149156
150-
- name: Test 13 - add script - Add a new MLC script
157+
- name: Test 14 - add script - Add a new MLC script
151158
run: |
152159
mlc add script my-script-1 --tags=my,new-tags-1
153160
mlc add script my-script-2 --tags=my,new-tags-2
154161
mlc add script my-script-3 --tags=my,new-tags3 --template_tags=detect,os
155162
mlc add script mlcommons@mlperf-automations:my-script-4 --tags=my,new-tags4 --template_tags=detect,os
156163
157-
- name: Test 14 - mv script - Move/rename an MLC script
164+
- name: Test 15 - mv script - Move/rename an MLC script
158165
run: |
159166
mlc mv script my-script-1 moved-my-script-1
160167
mlc mv script my-script-2 mlcommons@mlperf-automations:moved-my-script-2
161168
162-
- name: Test 15 - show script
169+
- name: Test 16 - show script
163170
run: |
164171
mlc show script --tags=run-mlperf,inference
165172
mlc show script 863735b7db8c44fc
166173
mlc show script detect-os,863735b7db8c44fc
167174
mlc show script detect-os
168175
169-
- name: Test 16 - find script
176+
- name: Test 17 - find script
170177
run: |
171178
mlc find script --tags=run-mlperf,inference
172179
mlc find script 863735b7db8c44fc
173180
mlc find script detect-os,863735b7db8c44fc
174181
mlc find script detect-os
175182
176-
- name: Test 17 - rm script
183+
- name: Test 18 - rm script
177184
run: |
178185
mlc rm script get-ipol-src -f
179186
mlc rm script --tags=app,image,corner-detection -f

0 commit comments

Comments
 (0)