2023-06-02 19:35:55 +00:00
|
|
|
name: test-ui
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'CHANGELOG.md'
|
|
|
|
- '.changelog/**'
|
|
|
|
- '.tours/**'
|
|
|
|
- 'contributing/**'
|
|
|
|
- 'demo/**'
|
|
|
|
- 'dev/**'
|
|
|
|
- 'e2e/**'
|
|
|
|
- 'integrations/**'
|
|
|
|
- 'pkg/**'
|
|
|
|
- 'scripts/**'
|
|
|
|
- 'terraform/**'
|
|
|
|
- 'website/**'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/**
|
|
|
|
- test-ui
|
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'CHANGELOG.md'
|
|
|
|
- '.changelog/**'
|
|
|
|
- '.tours/**'
|
|
|
|
- 'contributing/**'
|
|
|
|
- 'demo/**'
|
|
|
|
- 'dev/**'
|
|
|
|
- 'e2e/**'
|
|
|
|
- 'integrations/**'
|
|
|
|
- 'pkg/**'
|
|
|
|
- 'scripts/**'
|
|
|
|
- 'terraform/**'
|
|
|
|
- 'website/**'
|
|
|
|
|
|
|
|
jobs:
|
2023-06-20 22:10:44 +00:00
|
|
|
pre-test:
|
2023-06-02 19:35:55 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-15 14:38:50 +00:00
|
|
|
timeout-minutes: 30
|
2023-06-20 21:56:58 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ui
|
2023-06-20 22:10:44 +00:00
|
|
|
outputs:
|
|
|
|
nonce: ${{ steps.nonce.outputs.nonce }}
|
2023-06-02 19:35:55 +00:00
|
|
|
steps:
|
2023-07-28 15:49:57 +00:00
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2023-07-06 17:41:17 +00:00
|
|
|
- uses: ./.github/actions/setup-js
|
2023-06-02 19:35:55 +00:00
|
|
|
- name: lint:js
|
2023-06-20 21:56:58 +00:00
|
|
|
run: yarn run lint:js
|
2023-06-02 19:35:55 +00:00
|
|
|
- name: lint:hbs
|
2023-06-20 21:56:58 +00:00
|
|
|
run: yarn run lint:hbs
|
2023-06-20 22:10:44 +00:00
|
|
|
- id: nonce
|
|
|
|
name: nonce
|
|
|
|
run: echo "nonce=${{ github.run_id }}-$(date +%s)" >> "$GITHUB_OUTPUT"
|
|
|
|
|
2023-06-20 19:43:45 +00:00
|
|
|
tests:
|
|
|
|
needs:
|
2023-06-20 22:10:44 +00:00
|
|
|
- pre-test
|
2023-07-06 17:41:17 +00:00
|
|
|
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
|
2023-06-20 21:56:58 +00:00
|
|
|
timeout-minutes: 30
|
2023-06-22 15:31:49 +00:00
|
|
|
continue-on-error: true
|
2023-06-20 21:56:58 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ui
|
2023-06-20 19:43:45 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
partition: [1, 2, 3, 4]
|
|
|
|
split: [4]
|
2023-06-20 21:56:58 +00:00
|
|
|
steps:
|
2023-07-28 15:49:57 +00:00
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2023-07-06 17:41:17 +00:00
|
|
|
- uses: ./.github/actions/setup-js
|
|
|
|
- uses: browser-actions/setup-chrome@c485fa3bab6be59dce18dbc18ef6ab7cbc8ff5f1 # v1.2.0
|
2023-07-07 19:27:12 +00:00
|
|
|
- uses: ./.github/actions/vault-secrets
|
|
|
|
with:
|
|
|
|
paths: |-
|
|
|
|
kv/data/teams/nomad/ui PERCY_TOKEN ;
|
2023-06-20 21:56:58 +00:00
|
|
|
- name: ember exam
|
|
|
|
env:
|
2023-07-07 19:27:12 +00:00
|
|
|
PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }}
|
2023-06-20 22:10:44 +00:00
|
|
|
PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }}
|
2023-06-20 21:56:58 +00:00
|
|
|
run: yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }}
|
2023-07-06 17:41:17 +00:00
|
|
|
|
2023-06-20 19:43:45 +00:00
|
|
|
finalize:
|
2023-07-06 17:41:17 +00:00
|
|
|
needs:
|
|
|
|
- pre-test
|
|
|
|
- tests
|
|
|
|
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
|
2023-06-20 19:43:45 +00:00
|
|
|
timeout-minutes: 30
|
2023-06-20 21:56:58 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ui
|
2023-06-20 19:43:45 +00:00
|
|
|
steps:
|
2023-07-28 15:49:57 +00:00
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2023-07-06 17:41:17 +00:00
|
|
|
- uses: ./.github/actions/setup-js
|
2023-07-07 19:27:12 +00:00
|
|
|
- uses: ./.github/actions/vault-secrets
|
|
|
|
with:
|
|
|
|
paths: |-
|
|
|
|
kv/data/teams/nomad/ui PERCY_TOKEN ;
|
2023-06-20 19:43:45 +00:00
|
|
|
- name: finalize
|
2023-06-02 19:35:55 +00:00
|
|
|
env:
|
2023-07-07 19:27:12 +00:00
|
|
|
PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }}
|
2023-06-20 22:10:44 +00:00
|
|
|
PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }}
|
2023-06-20 21:56:58 +00:00
|
|
|
run: yarn percy build:finalize
|
2023-06-02 19:35:55 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-07-07 19:27:12 +00:00
|
|
|
id-token: write
|