Skip to content

Commit 25f2ad3

Browse files
committed
bump version v0.3.8, merge branch 'devel'
2 parents 89d16b3 + 6a67200 commit 25f2ad3

20 files changed

+318
-392
lines changed

.github/workflows/checkbot.yml

Lines changed: 33 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,57 @@
11
name: checkbot
2-
32
on:
43
issue_comment:
54
types: [created]
6-
7-
env:
8-
repo_token: ${{ secrets.TEST_GITHUB_TOKEN }}
9-
105
jobs:
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

.github/workflows/dependancron.yml

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
1-
name: "Update dependencies"
2-
1+
name: Update dependencies
32
on:
43
schedule:
5-
# runs every six hours
4+
# every six hours
65
- cron: 0 */6 * * *
7-
8-
env:
9-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10-
116
jobs:
127
dependancron:
138
runs-on: [ubuntu-latest]
14-
159
steps:
16-
- uses: actions/checkout@v2
17-
18-
- name: "Check dependencies"
19-
id: check
20-
run: |
21-
sudo wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list
22-
sudo apt update && sudo apt -y install dvc
23-
CML_VER=$(docker run dvcorg/cml:latest dvc --version)
24-
DVC_VER=$(dvc --version)
25-
UPDATE=false
26-
MESSAGE="Updating DVC from $CML_VER to $DVC_VER"
27-
if [ $CML_VER != $DVC_VER ]; then
28-
UPDATE=true
29-
echo "$DVC_VER" > .dependancron
30-
fi
31-
32-
echo "::set-output name=update::${UPDATE}"
33-
echo "::set-output name=comment::${MESSAGE}"
10+
- uses: actions/checkout@v2
11+
- name: Check dependencies
12+
id: check
13+
run: |
14+
sudo wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list
15+
sudo apt update && sudo apt -y install dvc
16+
CML_VER=$(docker run dvcorg/cml:latest dvc --version)
17+
DVC_VER=$(dvc --version)
18+
UPDATE=false
19+
MESSAGE="Updating DVC from $CML_VER to $DVC_VER"
20+
if [ $CML_VER != $DVC_VER ]; then
21+
UPDATE=true
22+
echo "$DVC_VER" > .dependancron
23+
fi
3424
35-
- name: Create Pull Request
36-
if: steps.check.outputs.update == 'true'
37-
uses: peter-evans/create-pull-request@v3
38-
with:
39-
title: 'chore: dependancron update dependencies'
40-
body: ${{ steps.check.outputs.comment }}
41-
branch: 'dependancron-update-dependencies'
25+
echo "::set-output name=update::${UPDATE}"
26+
echo "::set-output name=comment::${MESSAGE}"
27+
- name: Create Pull Request
28+
if: steps.check.outputs.update == 'true'
29+
uses: peter-evans/create-pull-request@v3
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
title: 'chore: dependancron update dependencies'
33+
body: ${{ steps.check.outputs.comment }}
34+
branch: dependancron-update-dependencies
35+
commit-message: ${{ steps.check.outputs.comment }}
36+
author:
37+
'Olivaw[bot] <[email protected]>'
38+
committer:
39+
'Olivaw[bot] <[email protected]>'

.github/workflows/gitlab.yml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ on:
22
workflow_dispatch:
33
pull_request:
44
push:
5-
65
jobs:
76
test:
87
runs-on: ubuntu-latest
98
services:
10-
gitlab:
9+
gitlab:
1110
image: docker://gitlab/gitlab-ce
1211
ports:
1312
- 8000:8000
@@ -26,9 +25,8 @@ jobs:
2625
steps:
2726
- name: Checkout repository
2827
uses: actions/checkout@v2
29-
3028
- name: Configure credentials
31-
run: >-
29+
run: |
3230
docker exec ${{ job.services.gitlab.id }} bin/gitlab-rails runner "
3331
; user = User.find_by_username('root')
3432
; user.password = '${{ github.token }}'
@@ -38,42 +36,39 @@ jobs:
3836
; token.set_token('${{ github.token }}')
3937
; token.save!
4038
"
41-
4239
- name: Create test project
43-
run: >-
44-
curl "http://localhost:8000/gitlab/api/v4/projects"
45-
--header "PRIVATE-TOKEN: ${{ github.token }}"
46-
--request POST
47-
--get
40+
run: |
41+
curl "http://localhost:8000/gitlab/api/v4/projects" \
42+
--header "PRIVATE-TOKEN: ${{ github.token }}" \
43+
--request POST \
44+
--get \
4845
--data "name=test"
49-
5046
- name: Create test commit
51-
run: >-
52-
curl "http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/files/README.md"
53-
--header "PRIVATE-TOKEN: ${{ github.token }}"
54-
--request POST
55-
--get
56-
--data "author_email=test@test"
57-
--data "author_name=Test"
58-
--data "branch=main"
59-
--data "commit_message=Create%20README.md"
47+
run: |
48+
curl "http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/files/README.md" \
49+
--header "PRIVATE-TOKEN: ${{ github.token }}" \
50+
--request POST \
51+
--get \
52+
--data "author_email=test@test" \
53+
--data "author_name=Test" \
54+
--data "branch=main" \
55+
--data "commit_message=Create%20README.md" \
6056
--data "content=Test"
61-
6257
- name: Get last commit
6358
id: commit
64-
run: >-
65-
curl "http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/commits/main"
66-
--header "PRIVATE-TOKEN: ${{ github.token }}"
67-
--request GET | jq -r .id | xargs -0 printf "::set-output name=hash::%s"
68-
59+
run: |
60+
curl "http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/commits/main" \
61+
--header "PRIVATE-TOKEN: ${{ github.token }}" \
62+
--request GET \
63+
| jq -r .id \
64+
| xargs -0 printf "::set-output name=hash::%s"
6965
- name: Install dependencies
7066
run: npm ci
71-
7267
- name: Run cml-send-comment
73-
run: >-
74-
node bin/cml-send-comment.js
75-
--token=${{ github.token }}
76-
--repo=http://localhost:8000/gitlab/root/test
77-
--commit-sha=${{ steps.commit.outputs.hash }}
78-
--driver=gitlab
68+
run: |
69+
node bin/cml-send-comment.js \
70+
--token=${{ github.token }} \
71+
--repo=http://localhost:8000/gitlab/root/test \
72+
--commit-sha=${{ steps.commit.outputs.hash }} \
73+
--driver=gitlab \
7974
<(echo message)

0 commit comments

Comments
 (0)