Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pr workflow #615

Merged
merged 3 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
Loading