diff --git a/.github/workflows/cml-1116.yml b/.github/workflows/cml-1116.yml index 3b9b0f2..98beed1 100644 --- a/.github/workflows/cml-1116.yml +++ b/.github/workflows/cml-1116.yml @@ -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 diff --git a/workflows/cml-1116.yml b/workflows/cml-1116.yml index c34089b..00621c8 100644 --- a/workflows/cml-1116.yml +++ b/workflows/cml-1116.yml @@ -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 @@ -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" \ No newline at end of file