diff options
Diffstat (limited to 'workflow_sources/test/tests.lib.yml')
-rw-r--r-- | workflow_sources/test/tests.lib.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/workflow_sources/test/tests.lib.yml b/workflow_sources/test/tests.lib.yml new file mode 100644 index 0000000000..f6c7c05912 --- /dev/null +++ b/workflow_sources/test/tests.lib.yml @@ -0,0 +1,41 @@ +#@ load("@ytt:data", "data") +#@ load("util.star", "to_build_args") +#@ load("helpers.star", "ci_image", "skip_ci_condition") + +#@ def tests_job(dep): +name: #@ dep.name +needs: [prepare] +runs-on: ubuntu-18.04 +if: #@ skip_ci_condition() +#@yaml/text-templated-strings +steps: + - name: RECORD STEP START + id: buildevents + run: | + echo "::set-output name=step_start::$(date +%s)" + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GCR_JSON_KEY }} + export_default_credentials: true + - name: RUN TESTS + run: | + gcloud auth configure-docker + docker pull (@= ci_image() @) + mkdir ct-logs && chmod 777 ct-logs + docker run \ + --env project=(@= dep.name @) \ + --env GITHUB_RUN_ID=${{ github.run_id }} \ + --env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \ + --env STEP_START=${{ steps.buildevents.outputs.step_start }} \ + --volume ${PWD}/ct-logs:/workspace/ct-logs \ + --oom-kill-disable \ + (@= ci_image() @) \ + ci/scripts/tests.sh + - name: ON FAILURE UPLOAD TESTS LOGS ARTIFACT + #! https://github.com/marketplace/actions/upload-artifact + uses: actions/upload-artifact@v2-preview + if: failure() + with: + name: (@= dep.name @)-ct-logs + path: "ct-logs/*-ct-logs-*.tar.xz" +#@ end
\ No newline at end of file |