mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 06:03:08 +00:00
6a5823ab5c
Fix all e2e tests
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: "e2e-pr"
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
- opened
|
|
|
|
jobs:
|
|
e2e-full:
|
|
if: ${{ github.event.label.name == 'pr:e2e' }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
steps:
|
|
- name: Trigger Success
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: "nasa",
|
|
repo: "openmct",
|
|
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
|
})
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
- run: npx playwright@1.21.1 install
|
|
- run: npm install
|
|
- run: npm run test:e2e:full
|
|
- name: Archive test results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: test-results
|
|
- name: Test success
|
|
if: ${{ success() }}
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: "nasa",
|
|
repo: "openmct",
|
|
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
|
})
|
|
- name: Test failure
|
|
if: ${{ failure() }}
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: "nasa",
|
|
repo: "openmct",
|
|
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
|
})
|