-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (50 loc) · 1.48 KB
/
test.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
name: Test branch or PR
on:
pull_request:
types: [opened, review_requested, ready_for_review, synchronize, unlocked]
merge_group:
types: [checks_requested]
push:
branches:
- 'dev_test_workflow'
workflow_dispatch:
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
env:
CO_MODELS_SRC: CoModels
TEST_DIR: test_dir
jobs:
test_job:
name: Collect information about PR and source
#runs-on: ${{ matrix.runs-on }} # todo
#runs-on: ubuntu-latest
runs-on: co-models-ci-0
steps:
- name: Set up branch name
id: event-info
if: github.event_name == 'push'
run: |
branch=${{ github.ref_name }}
echo "BRANCH=$branch" >> $GITHUB_ENV
- name: Set up model name from workflow_dispatch branch
if: github.event_name == 'workflow_dispatch'
run: |
branch=${{ github.ref_name }}
echo "BRANCH=$branch" >> $GITHUB_ENV
- name: Checkout CoModels branch
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
path: ${{ env.CO_MODELS_SRC}}
- name: Prepare test directory
run: |
#model_dir='${{ env.CO_MODELS_SRC }}/cv/classification/${{ env.BRANCH }}'
model_dir='${{ env.CO_MODELS_SRC }}/cv/classification/resnet50'
cp -rL $model_dir ${{ env.TEST_DIR }}
- name: Run scripts
run: |
cd ${{ env.TEST_DIR }}
ls
bash infer.sh
bash train.sh