Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhousley committed Jul 13, 2023
1 parent 7029b91 commit d0a98ec
Show file tree
Hide file tree
Showing 9 changed files with 304 additions and 532 deletions.
155 changes: 155 additions & 0 deletions .github/workflows/jil-all-browsers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: 'JIL: All browsers'

on:
workflow_dispatch:
inputs:
build-number:
description: 'Used to associate test results reported to New Relic to the BUILD_NUMBER identifier'
required: true
type: string
workflow_call:
inputs:
build-number:
description: 'Used to associate test results reported to New Relic to the BUILD_NUMBER identifier'
required: true
type: string
ref:
description: 'Github branch ref to checkout and run tests on'
required: false
type: string
secrets:
JIL_SAUCE_LABS_USERNAME:
required: true
JIL_SAUCE_LABS_ACCESS_KEY:
required: true
JIL_NODE_NEW_RELIC_LICENSE_KEY:
required: true

jobs:
chrome-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: chrome@*
build-number: ${{ inputs.build-number }}
collection: unit
secrets: inherit

chrome-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: chrome@*
build-number: ${{ inputs.build-number }}
collection: functional
secrets: inherit

firefox-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: firefox@*
build-number: ${{ inputs.build-number }}
collection: unit
secrets: inherit

firefox-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: firefox@*
build-number: ${{ inputs.build-number }}
collection: functional
secrets: inherit

safari-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: safari@*
build-number: ${{ inputs.build-number }}
collection: unit
secrets: inherit

safari-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: safari@*
build-number: ${{ inputs.build-number }}
collection: functional
secrets: inherit

edge-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: edge@*
build-number: ${{ inputs.build-number }}
collection: unit
secrets: inherit

edge-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: edge@*
build-number: ${{ inputs.build-number }}
collection: functional
secrets: inherit

ios-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: ios@*
build-number: ${{ inputs.build-number }}
collection: unit
secrets: inherit

ios-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: ios@*
build-number: ${{ inputs.build-number }}
collection: functional
secrets: inherit

android-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: android@*
build-number: ${{ inputs.build-number }}
collection: unit
secrets: inherit

android-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: android@*
build-number: ${{ inputs.build-number }}
collection: functional
secrets: inherit

ie-unit:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: ie@11
build-number: ${{ inputs.build-number }}
collection: unit
additional-flags: -P
secrets: inherit

ie-functional:
uses: ./.github/workflows/jil-single-browser.yml
with:
ref: ${{ inputs.ref || github.ref }}
browser-target: ie@11
build-number: ${{ inputs.build-number }}
collection: functional
additional-flags: -P
secrets: inherit
92 changes: 92 additions & 0 deletions .github/workflows/jil-single-browser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: 'JIL: Single browser'

on:
workflow_dispatch:
inputs:
collection:
description: 'The collection of jil tests to run'
required: true
type: choice
options:
- unit
- functional
default: 'unit'
browser-target:
description: 'Which browser(s) and version(s) to target with the wdio test: chrome@latest OR chrome@* are examples'
required: true
type: string
build-number:
description: 'Used to associate test results reported to New Relic to the BUILD_NUMBER identifier'
required: true
type: string
additional-flags:
description: 'Additional flags to pass to the jil cli'
required: false
type: string
workflow_call:
inputs:
collection:
description: 'The collection of jil tests to run'
required: false
type: string
default: 'unit'
browser-target:
description: 'Which browser(s) and version(s) to target with the wdio test: chrome@latest OR chrome@* are examples'
required: true
type: string
build-number:
description: 'Used to associate test results reported to New Relic to the BUILD_NUMBER identifier'
required: true
type: string
additional-flags:
description: 'Additional flags to pass to the jil cli'
required: false
type: string
ref:
description: 'Github branch ref to checkout and run tests on'
required: false
type: string
secrets:
JIL_SAUCE_LABS_USERNAME:
required: true
JIL_SAUCE_LABS_ACCESS_KEY:
required: true
JIL_NODE_NEW_RELIC_LICENSE_KEY:
required: true

jobs:
jil:
name: JIL Test - ${{ inputs.browser-target }} - ${{ inputs.collection }}
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
BUILD_NUMBER: ${{ inputs.build-number }}
NEWRELIC_ENVIRONMENT: ci
JIL_SAUCE_LABS_USERNAME: ${{ secrets.JIL_SAUCE_LABS_USERNAME }}
JIL_SAUCE_LABS_ACCESS_KEY: ${{ secrets.JIL_SAUCE_LABS_ACCESS_KEY }}
NEW_RELIC_LICENSE_KEY: ${{ secrets.JIL_NODE_NEW_RELIC_LICENSE_KEY }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build agent
run: npm run build:all
- name: Run JIL Tests
run: |
node --max-old-space-size=8192 ./tools/jil/bin/cli.js \
-f merged \
-s \
-b ${{ inputs.browser-target }} \
--concurrent 10 \
--${{ inputs.collection}}-only \
-t 85000 \
${{ runner.debug && '-v -L -D -d' || '' }} \
${{ inputs.additional-flags || '' }}
5 changes: 5 additions & 0 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
branches:
- 'main'

# Only allow one instance of this workflow to run at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
jest-unit:
uses: ./.github/workflows/jest.yml
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,43 @@ jobs:
browser-target: chrome@latest
build-number: $BUILD_NUMBER
secrets: inherit

jil-smoke-unit:
name: 'JIL: Smoke Unit Test'
needs: wdio-smoke
uses: ./.github/workflows/jil-single-browser.yml
with:
browser-target: chrome@latest
build-number: $BUILD_NUMBER
collection: unit
secrets: inherit

jil-smoke-functional:
name: 'JIL: Smoke Functional Test'
needs: wdio-smoke
uses: ./.github/workflows/jil-single-browser.yml
with:
browser-target: chrome@latest
build-number: $BUILD_NUMBER
collection: functional
secrets: inherit

jil-polyfill-unit:
name: 'JIL: Polyfill Unit Test'
needs: jil-smoke-unit
uses: ./.github/workflows/jil-single-browser.yml
with:
browser-target: chrome@latest
build-number: $BUILD_NUMBER
collection: unit
secrets: inherit

jil-polyfill-functional:
name: 'JIL: Polyfill Functional Test'
needs: jil-smoke-functional
uses: ./.github/workflows/jil-single-browser.yml
with:
browser-target: chrome@latest
build-number: $BUILD_NUMBER
collection: functional
secrets: inherit
15 changes: 12 additions & 3 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,32 @@ jobs:
browser-target: chrome@latest
build-number: PR${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number}}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}
coverage: true
additional-flags: -v
secrets: inherit

wdio:
name: WDIO
if: github.event_name == 'workflow_dispatch'
needs: [find-pull-request,wdio-coverage]
needs: find-pull-request
uses: ./.github/workflows/wdio-all-browsers.yml
with:
ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge'
build-number: PR${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number}}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}
secrets: inherit

jil:
name: JIL
if: github.event_name == 'workflow_dispatch'
needs: [find-pull-request,wdio-coverage,wdio]
uses: ./.github/workflows/jil-all-browsers.yml
with:
ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge'
build-number: PR${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number}}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}
secrets: inherit

complete-status-comment-pull-request:
name: Comment pull request
if: always() && github.event_name == 'workflow_dispatch' && needs.find-pull-request.result == 'success'
needs: [find-pull-request,wdio-coverage,wdio]
needs: [find-pull-request,wdio-coverage,wdio,jil]
runs-on: ubuntu-latest
defaults:
run:
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/smoke-test.yml

This file was deleted.

Loading

0 comments on commit d0a98ec

Please sign in to comment.