2021-11-30 00:34:47 +00:00
|
|
|
name: "e2e-pr"
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
2022-02-15 22:13:52 +00:00
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
- opened
|
2021-11-30 00:34:47 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
e2e-full:
|
|
|
|
if: ${{ github.event.label.name == 'pr:e2e' }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Trigger Success
|
2022-02-15 23:31:06 +00:00
|
|
|
uses: actions/github-script@v6
|
2021-11-30 00:34:47 +00:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
github.rest.issues.createComment({
|
|
|
|
issue_number: context.issue.number,
|
2022-01-27 16:41:33 +00:00
|
|
|
owner: "nasa",
|
|
|
|
repo: "openmct",
|
2021-11-30 00:34:47 +00:00
|
|
|
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
|
|
|
})
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
2022-02-15 22:08:53 +00:00
|
|
|
node-version: '16'
|
2022-01-14 22:47:35 +00:00
|
|
|
- run: npx playwright install-deps
|
2021-11-30 00:34:47 +00:00
|
|
|
- run: npm install
|
|
|
|
- run: npm run test:e2e:full
|
|
|
|
- name: Archive test results
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
path: test-results
|
|
|
|
- name: Test success
|
|
|
|
if: ${{ success() }}
|
2022-02-15 23:31:06 +00:00
|
|
|
uses: actions/github-script@v6
|
2021-11-30 00:34:47 +00:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
github.rest.issues.createComment({
|
|
|
|
issue_number: context.issue.number,
|
2022-01-27 16:41:33 +00:00
|
|
|
owner: "nasa",
|
|
|
|
repo: "openmct",
|
2021-11-30 00:34:47 +00:00
|
|
|
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
|
|
|
})
|
|
|
|
- name: Test failure
|
|
|
|
if: ${{ failure() }}
|
2022-02-15 23:31:06 +00:00
|
|
|
uses: actions/github-script@v6
|
2021-11-30 00:34:47 +00:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
github.rest.issues.createComment({
|
|
|
|
issue_number: context.issue.number,
|
2022-01-27 16:41:33 +00:00
|
|
|
owner: "nasa",
|
|
|
|
repo: "openmct",
|
2021-11-30 00:34:47 +00:00
|
|
|
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
|
|
|
})
|