Skip to content

Tests

Tests #19

Workflow file for this run

name: Tests
on:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
integration-tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_sha }}
repository: ${{ github.event.workflow_run.repository.full_name }}
- name: Run Integration Tests
id: integration_test
run: >
DOCKER_BUILDKIT=1 docker build
--progress=plain
--build-arg KEY=${{ secrets.KEY }}
--build-arg SECRET=${{ secrets.SECRET }}
--build-arg CONDUCTOR_SERVER_URL=${{ secrets.CONDUCTOR_SERVER_URL }}
--target=inttest
.
- name: Set PR Status to Failure
if: ${{ failure() }}
uses: actions/github-script@v6
with:
script: |
const { owner, repo } = context.repo;
const sha = context.payload.workflow_run.head_sha;
await github.rest.repos.createCommitStatus({
owner: owner,
repo: repo,
sha: sha,
state: 'failure',
context: 'Integration Tests',
description: 'Integration tests failed.',
});
- name: Set PR Status to Success
if: ${{ success() }}
uses: actions/github-script@v6
with:
script: |
const { owner, repo } = context.repo;
const sha = context.payload.workflow_run.head_sha;
await github.rest.repos.createCommitStatus({
owner: owner,
repo: repo,
sha: sha,
state: 'success',
context: 'Integration Tests',
description: 'Integration tests succeeded.',
});