Skip to content

Commit

Permalink
Merge branch 'main' into rum-post
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhousley committed May 23, 2023
2 parents 569419d + 68280ca commit edee417
Show file tree
Hide file tree
Showing 51 changed files with 1,842 additions and 22,661 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Nightly Jobs'

on:
schedule:
# Runs every day at 4AM
- cron: '0 4 * * *'
workflow_dispatch:

env:
BUILD_NUMBER: Nightly-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}

jobs:
wdio-smoke:
name: 'WDIO: Smoke Test'
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: chrome@latest
build-number: $BUILD_NUMBER
secrets: inherit
58 changes: 58 additions & 0 deletions .github/workflows/wdio-all-browsers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'WDIO: All browsers'

on:
workflow_dispatch:
workflow_call:
secrets:
JIL_SAUCE_LABS_USERNAME:
required: true
JIL_SAUCE_LABS_ACCESS_KEY:
required: true
JIL_NODE_NEW_RELIC_LICENSE_KEY:
required: true

env:
BUILD_NUMBER: PR${{ github.event.number }}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}

jobs:
chrome:
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: chrome@*
build-number: $BUILD_NUMBER
secrets: inherit

firefox:
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: firefox@*
build-number: $BUILD_NUMBER
secrets: inherit

safari:
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: safari@*
build-number: $BUILD_NUMBER
secrets: inherit

edge:
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: edge@*
build-number: $BUILD_NUMBER
secrets: inherit

ios:
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: ios@*
build-number: $BUILD_NUMBER
secrets: inherit

android:
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: android@*
build-number: $BUILD_NUMBER
secrets: inherit
74 changes: 74 additions & 0 deletions .github/workflows/wdio-single-browser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 'WDIO: Single browser'

on:
workflow_dispatch:
inputs:
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 wdio cli'
required: false
type: string
workflow_call:
inputs:
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 wdio cli'
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:
wdio:
name: WDIO Test - ${{ inputs.browser-target }}
timeout-minutes: 60
continue-on-error: true
runs-on: ubuntu-latest
container:
image: 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:
- name: Setup Container
run: apt update && apt install -y git
- uses: actions/checkout@v3
- 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 WDIO Tests
run: |
node ./tools/wdio/bin/cli.js \
-s \
-b ${{ inputs.browser-target }} \
--concurrent 10 \
${{ runner.debug && '-v -L -D -d' }} \
${{ inputs.additional-flags }}
Loading

0 comments on commit edee417

Please sign in to comment.