chore: update workflow again
This commit is contained in:
@@ -1,7 +1,29 @@
|
||||
name: Tugboat E2E Tests
|
||||
on: deployment_status
|
||||
|
||||
jobs:
|
||||
set-pending:
|
||||
if: github.event.deployment_status.state != 'success' && github.event.deployment_status.state != 'failed'
|
||||
name: Run tests against Tugboat
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Set an initial commit status message to indicate that the tests are
|
||||
# running.
|
||||
- name: set pending status
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}}
|
||||
debug: true
|
||||
script: |
|
||||
return github.repos.createCommitStatus({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
sha: context.sha,
|
||||
state: 'pending',
|
||||
context: 'Backstage Tugboat E2E Tests',
|
||||
description: 'Running tests',
|
||||
target_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
|
||||
});
|
||||
|
||||
run-tests:
|
||||
# Only run after a successful Tugboat deployment.
|
||||
if: github.event.deployment_status.state == 'success'
|
||||
@@ -21,9 +43,9 @@ jobs:
|
||||
repo: context.repo.repo,
|
||||
sha: context.sha,
|
||||
state: 'pending',
|
||||
context: 'Nightwatch.js tests',
|
||||
context: 'Backstage Tugboat E2E Tests',
|
||||
description: 'Running tests',
|
||||
target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
target_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
|
||||
});
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
@@ -57,8 +79,8 @@ jobs:
|
||||
return result.data.environment_url;
|
||||
- name: echo tugboat preview url
|
||||
run: |
|
||||
echo ${{ steps.get-status-env.outputs.result }}
|
||||
echo ${{steps.get-status-env.outputs.result}}
|
||||
# The first time you hit a Tugboat URL it can take a while to load, so
|
||||
# we visit it once here to prime it. Otherwise the very first test
|
||||
# will often timeout.
|
||||
curl ${{ steps.get-status-env.outputs.result }}
|
||||
curl ${{steps.get-status-env.outputs.result}}
|
||||
|
||||
Reference in New Issue
Block a user