Skip to content

Commit

Permalink
Merge branch 'lint-yaml' into devel
Browse files Browse the repository at this point in the history
- closes #497
  • Loading branch information
casperdcl committed May 5, 2021
2 parents 44b797e + 7ee050e commit debcae1
Show file tree
Hide file tree
Showing 13 changed files with 177 additions and 173 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/checkbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
with:
python-version: '3.x'

- name: "CML test"
- name: 'CML test'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -79,41 +79,41 @@ jobs:
test_machine_aws:
needs: check-container
runs-on: [self-hosted,cml-runner-aws-gpu]
runs-on: [self-hosted, cml-runner-aws-gpu]
steps:
- name: "tests"
run: |
nvidia-smi
- name: 'tests'
run: |
nvidia-smi
test_container_aws:
needs: check-container
runs-on: [self-hosted,cml-runner-aws-gpu]
runs-on: [self-hosted, cml-runner-aws-gpu]
container:
image: docker://dvcorg/cml-test
options: --gpus all
steps:
- name: "tests"
run: |
nvidia-smi
- name: 'tests'
run: |
nvidia-smi
test_machine_az:
needs: check-container
runs-on: [self-hosted,cml-runner-az-gpu]
runs-on: [self-hosted, cml-runner-az-gpu]
steps:
- name: "tests"
run: |
nvidia-smi
- name: 'tests'
run: |
nvidia-smi
test_container_az:
needs: check-container
runs-on: [self-hosted,cml-runner-az-gpu]
runs-on: [self-hosted, cml-runner-az-gpu]
container:
image: docker://dvcorg/cml-test
options: --gpus all
steps:
- name: "tests"
run: |
nvidia-smi
- name: 'tests'
run: |
nvidia-smi
chatbot:
if: contains(github.event.comment.body, '/cml-')
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/dependancron.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: "Update dependencies"
name: 'Update dependencies'

on:
schedule:
# runs every six hours
# runs every six hours
- cron: 0 */6 * * *

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
dependancron:
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- name: "Check dependencies"
id: check
run: |
sudo wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list
sudo apt update && sudo apt -y install dvc
CML_VER=$(docker run dvcorg/cml:latest dvc --version)
DVC_VER=$(dvc --version)
UPDATE=false
MESSAGE="Updating DVC from $CML_VER to $DVC_VER"
if [ $CML_VER != $DVC_VER ]; then
UPDATE=true
echo "$DVC_VER" > .dependancron
fi
- uses: actions/checkout@v2

- name: 'Check dependencies'
id: check
run: |
sudo wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list
sudo apt update && sudo apt -y install dvc
CML_VER=$(docker run dvcorg/cml:latest dvc --version)
DVC_VER=$(dvc --version)
UPDATE=false
MESSAGE="Updating DVC from $CML_VER to $DVC_VER"
if [ $CML_VER != $DVC_VER ]; then
UPDATE=true
echo "$DVC_VER" > .dependancron
fi
echo "::set-output name=update::${UPDATE}"
echo "::set-output name=comment::${MESSAGE}"
echo "::set-output name=update::${UPDATE}"
echo "::set-output name=comment::${MESSAGE}"
- name: Create Pull Request
if: steps.check.outputs.update == 'true'
uses: peter-evans/create-pull-request@v3
with:
title: 'chore: dependancron update dependencies'
body: ${{ steps.check.outputs.comment }}
branch: 'dependancron-update-dependencies'
- name: Create Pull Request
if: steps.check.outputs.update == 'true'
uses: peter-evans/create-pull-request@v3
with:
title: 'chore: dependancron update dependencies'
body: ${{ steps.check.outputs.comment }}
branch: 'dependancron-update-dependencies'
68 changes: 29 additions & 39 deletions .github/workflows/gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
test:
runs-on: ubuntu-latest
services:
gitlab:
gitlab:
image: docker://gitlab/gitlab-ce
ports:
- 8000:8000
Expand All @@ -26,54 +26,44 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Configure credentials
run: >-
docker exec ${{ job.services.gitlab.id }} bin/gitlab-rails runner "
; user = User.find_by_username('root')
; user.password = '${{ github.token }}'
; user.password_confirmation = '${{ github.token }}'
; user.save!
; token = user.personal_access_tokens.create(scopes: [:api], name: 'Token')
; token.set_token('${{ github.token }}')
; token.save!
"
docker exec ${{ job.services.gitlab.id }} bin/gitlab-rails runner " ;
user = User.find_by_username('root') ; user.password = '${{
github.token }}' ; user.password_confirmation = '${{ github.token }}'
; user.save! ; token = user.personal_access_tokens.create(scopes:
[:api], name: 'Token') ; token.set_token('${{ github.token }}') ;
token.save! "
- name: Create test project
run: >-
curl "http://localhost:8000/gitlab/api/v4/projects"
--header "PRIVATE-TOKEN: ${{ github.token }}"
--request POST
--get
--data "name=test"
curl "http://localhost:8000/gitlab/api/v4/projects" --header
"PRIVATE-TOKEN: ${{ github.token }}" --request POST --get --data
"name=test"
- name: Create test commit
run: >-
curl "http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/files/README.md"
--header "PRIVATE-TOKEN: ${{ github.token }}"
--request POST
--get
--data "author_email=test@test"
--data "author_name=Test"
--data "branch=main"
--data "commit_message=Create%20README.md"
--data "content=Test"
curl
"http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/files/README.md"
--header "PRIVATE-TOKEN: ${{ github.token }}" --request POST --get
--data "author_email=test@test" --data "author_name=Test" --data
"branch=main" --data "commit_message=Create%20README.md" --data
"content=Test"
- name: Get last commit
id: commit
run: >-
curl "http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/commits/main"
--header "PRIVATE-TOKEN: ${{ github.token }}"
--request GET | jq -r .id | xargs -0 printf "::set-output name=hash::%s"
curl
"http://localhost:8000/gitlab/api/v4/projects/root%2Ftest/repository/commits/main"
--header "PRIVATE-TOKEN: ${{ github.token }}" --request GET | jq -r
.id | xargs -0 printf "::set-output name=hash::%s"
- name: Install dependencies
run: npm ci

- name: Run cml-send-comment
run: >-
node bin/cml-send-comment.js
--token=${{ github.token }}
--repo=http://localhost:8000/gitlab/root/test
--commit-sha=${{ steps.commit.outputs.hash }}
--driver=gitlab
<(echo message)
node bin/cml-send-comment.js --token=${{ github.token }}
--repo=http://localhost:8000/gitlab/root/test --commit-sha=${{
steps.commit.outputs.hash }} --driver=gitlab <(echo message)

2 comments on commit debcae1

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.