11name : checkbot
2-
32on :
43 issue_comment :
54 types : [created]
6-
7- env :
8- repo_token : ${{ secrets.TEST_GITHUB_TOKEN }}
9-
105jobs :
116 # check that CML container builds properly
127 build-container :
138 if : contains(github.event.comment.body, '/tests')
149 runs-on : [ubuntu-18.04]
15-
1610 steps :
1711 - uses : actions/checkout@v2
18-
19- - name : Build test image and publish
20- run : |
12+ - name : Build & Publish test image
13+ run : |
2114 echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
22-
23- docker build -t dvcorg/cml -f ./docker/Dockerfile .
24- docker build -t dvcorg/cml-py3 -f ./docker/Dockerfile-py3 .
25-
26- docker tag dvcorg/cml dvcorg/cml-test
27- docker push dvcorg/cml-test
15+ docker build \
16+ --build-arg "CML_VERSION=$CML_VERSION" \
17+ --build-arg "DVC_VERSION=$DVC_VERSION" \
18+ --build-arg "PYTHON_VERSION=$PYTHON_VERSION" \
19+ --build-arg "BASE_IMAGE=$BASE_IMAGE" \
20+ -t dvcorg/cml-test .
2821 docker run --name runner --rm \
29- -e "repo_token=$repo_token " \
22+ -e "REPO_TOKEN=${{ secrets.TEST_GITHUB_TOKEN }} " \
3023 -e "RUNNER_REPO=https://github.com/${GITHUB_REPOSITORY}" \
3124 -e "RUNNER_LABELS=cml-docker" \
3225 -e "RUNNER_IDLE_TIMEOUT=10" \
3326 dvcorg/cml-test
34-
27+ env :
28+ CML_VERSION : 0
29+ DVC_VERSION : 2
30+ PYTHON_VERSION : 3.8
31+ BASE_IMAGE : ' ubuntu:20.04'
3532 # test container all CML features, vega and actions with issues in the past
3633 check-container :
3734 needs : build-container
3835 runs-on : [ubuntu-18.04]
3936 container : dvcorg/cml-test
40-
4137 steps :
4238 - uses : actions/checkout@v2
43-
4439 - uses : hashicorp/setup-terraform@v1
4540 with :
4641 terraform_version : 0.14.3
47-
4842 - uses : r-lib/actions/setup-r@master
49-
5043 - uses : actions/setup-python@v2
5144 with :
5245 python-version : ' 3.x'
53-
54- - name : " CML test"
46+ - name : CML test
5547 env :
5648 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
57- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
49+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
5850 AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
5951 AZURE_CLIENT_SECRET : ${{ secrets.AZURE_CLIENT_SECRET }}
6052 AZURE_SUBSCRIPTION_ID : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
6153 AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
54+ REPO_TOKEN : ${{ secrets.TEST_GITHUB_TOKEN }}
6255 run : |
6356 echo 'Check container!' > report.md
6457 vl2svg assets/vega-lite.json | cml-publish --md >> report.md
@@ -81,52 +74,45 @@ jobs:
8174 --cloud-type g2.2xlarge \
8275 --idle-timeout 3600 \
8376 --labels cml-runner-aws-gpu
84-
8577 test_machine_aws :
8678 needs : check-container
87- runs-on : [self-hosted,cml-runner-aws-gpu]
79+ runs-on : [self-hosted, cml-runner-aws-gpu]
8880 steps :
89- - name : " tests"
90- run : |
91- nvidia-smi
92-
81+ - name : tests
82+ run : |
83+ nvidia-smi
9384 test_container_aws :
9485 needs : check-container
95- runs-on : [self-hosted,cml-runner-aws-gpu]
86+ runs-on : [self-hosted, cml-runner-aws-gpu]
9687 container :
9788 image : docker://dvcorg/cml-test
9889 options : --gpus all
9990 steps :
100- - name : " tests"
101- run : |
102- nvidia-smi
103-
91+ - name : tests
92+ run : |
93+ nvidia-smi
10494 test_machine_az :
10595 needs : check-container
106- runs-on : [self-hosted,cml-runner-az-gpu]
96+ runs-on : [self-hosted, cml-runner-az-gpu]
10797 steps :
108- - name : " tests"
109- run : |
110- nvidia-smi
111-
98+ - name : tests
99+ run : |
100+ nvidia-smi
112101 test_container_az :
113102 needs : check-container
114- runs-on : [self-hosted,cml-runner-az-gpu]
103+ runs-on : [self-hosted, cml-runner-az-gpu]
115104 container :
116105 image : docker://dvcorg/cml-test
117106 options : --gpus all
118107 steps :
119- - name : " tests"
120- run : |
121- nvidia-smi
122-
108+ - name : tests
109+ run : |
110+ nvidia-smi
123111 chatbot :
124112 if : contains(github.event.comment.body, '/cml-')
125113 runs-on : [ubuntu-latest]
126-
127114 steps :
128115 - uses : actions/checkout@v2
129-
130116 - name : chatops
131117 id : chatops
132118 uses : actions/github-script@v1
@@ -142,7 +128,6 @@ jobs:
142128 }).then( (pr) => {
143129 console.log(`::set-output name=COMMAND::${process.env.COMMAND}`)
144130 })
145-
146131 - name : chatactions
147132 run : |
148133 npm ci
0 commit comments