Skip to content

Commit

Permalink
update for iterative/cml#1133
Browse files Browse the repository at this point in the history
  • Loading branch information
dacbd committed Aug 19, 2022
1 parent 6887bab commit 00ba779
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/cml-1116.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,39 @@ jobs:
run: |
which cml
cml --version
private-key-852:
environment: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test a CML Branch
if: ${{ env.TEST_CML_BRANCH }}
run: |
npm install -g canvas@2 vega@5 vega-cli@5 vega-lite@5 github:iterative/cml#${{ env.TEST_CML_BRANCH }}
- name: Standard CML setup
if: ${{ !env.TEST_CML_BRANCH }}
uses: iterative/setup-cml@v1
with:
version: ${{ env.TEST_CML_VERSION || 'latest' }}
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::342840881361:role/SandboxUser
aws-region: us-west-1
- name: Create Private key
run: |
openssl genrsa -out key.pem
- name: Create Runner
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
run: |
cml runner --cloud-metadata="actions_link=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" --cloud-startup-script=$(echo 'echo "$(curl https://github.com/'"$GITHUB_ACTOR"'.keys)" >> /home/ubuntu/.ssh/authorized_keys' | base64 -w 0) --labels=private-key-852 -test --cloud=aws --cloud-region=us-west --cloud-ssh-private="$(cat ./key.pem)" --cloud-type=t3.small
test-private-key-852:
needs: [private-key-852]
runs-on: [self-hosted, private-key-852 -test]
environment: test
steps:
- uses: actions/checkout@v3
- name: CML Version Test
run: |
which cml
cml --version
26 changes: 26 additions & 0 deletions workflows/cml-1116.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#// https://github.com/iterative/cml/issues/1116
#// https://github.com/iterative/cml/issues/852
#include "../includes/common_defines.yml"
#define NEEDS_AWS true
#define __AWS_REGION__ us-west-1
Expand Down Expand Up @@ -42,6 +43,31 @@ jobs:
--cloud-ssh-private="$(cat ./key.pem) " \
--cloud-type=t3.small
#include "../includes/tests/on-test.yml"
#// steps:
#include "../includes/steps/base-checkout.yml"
#include "../includes/tests/cml-version.yml"
#define JOB_ID private-key-852
#define TEST_JOB_ID test-JOB_ID
#define LABEL JOB_ID-test
#include "../includes/setup.yml"
#// steps:
#include "../includes/aws/aws-creds.yml"
- name: Create Private key
run: |
openssl genrsa -out key.pem
- name: Create Runner
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
run: |
cml runner \
__LINK_RUN__ \
__SSH_KEYS__ \
--labels=LABEL \
--cloud=aws \
--cloud-region=us-west \
--cloud-ssh-private="$(cat ./key.pem)" \
--cloud-type=t3.small
#include "../includes/tests/on-test.yml"
#// steps:
#include "../includes/steps/base-checkout.yml"
#include "../includes/tests/cml-version.yml"

0 comments on commit 00ba779

Please sign in to comment.