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' }}
|
2022-02-17 14:52:46 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
2021-11-30 00:34:47 +00:00
|
|
|
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
|
|
|
|
})
|
2022-03-02 17:59:13 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-08 02:33:18 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2021-11-30 00:34:47 +00:00
|
|
|
with:
|
2022-02-15 22:08:53 +00:00
|
|
|
node-version: '16'
|
2022-03-16 22:05:50 +00:00
|
|
|
- run: npx playwright@1.19.2 install
|
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
|
|
|
|
})
|