Skip to content

Nightly Jobs

Nightly Jobs #1035

Workflow file for this run

name: 'Nightly Jobs'
on:
schedule:
# Runs every day at 4AM
- cron: '0 4 * * *'
workflow_dispatch:
jobs:
wdio-smoke:
name: 'WDIO: Smoke Test'
uses: ./.github/workflows/wdio-single-browser.yml
with:
browser-target: chrome@latest
secrets: inherit
track-size:
name: Track Build Size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: 22.11.0 # See package.json for the stable node version that works with our testing. Do not change this unless you know what you are doing as some node versions do not play nicely with our testing server.
- name: Install project dependencies
run: npm ci
- name: Report lite size to NR
continue-on-error: true
uses: newrelic-apps/capture-build-size@v1.0.1
with:
nr-api-key: ${{ secrets.INTERNAL_STAGING_INGEST_LICENSE_KEY }}
nr-account-id: ${{ secrets.INTERNAL_STAGING_INGEST_ACCOUNT_ID }}
nr-env: 'staging'
analysis-file-url: 'https://js-agent.newrelic.com/dev/nr-rum-standard.stats.json'
file-name-filter: '.min.js'
trigger: 'nightly'
- name: Report pro size to NR
continue-on-error: true
uses: newrelic-apps/capture-build-size@v1.0.1
with:
nr-api-key: ${{ secrets.INTERNAL_STAGING_INGEST_LICENSE_KEY }}
nr-account-id: ${{ secrets.INTERNAL_STAGING_INGEST_ACCOUNT_ID }}
nr-env: 'staging'
analysis-file-url: 'https://js-agent.newrelic.com/dev/nr-full-standard.stats.json'
file-name-filter: '.min.js'
trigger: 'nightly'
- name: Report spa size to NR
continue-on-error: true
uses: newrelic-apps/capture-build-size@v1.0.1
with:
nr-api-key: ${{ secrets.INTERNAL_STAGING_INGEST_LICENSE_KEY }}
nr-account-id: ${{ secrets.INTERNAL_STAGING_INGEST_ACCOUNT_ID }}
nr-env: 'staging'
analysis-file-url: 'https://js-agent.newrelic.com/dev/nr-full-standard.stats.json'
file-name-filter: '.min.js'
trigger: 'nightly'
verify-ab-assets:
name: Verify A/B Assets
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.11.0 # See package.json for the stable node version that works with our testing. Do not change this unless you know what you are doing as some node versions do not play nicely with our testing server.
- name: Verify a/b assets
uses: ./.github/actions/fastly-verify
with:
fastly_key: ${{ secrets.FASTLY_PURGE_KEY }}
fastly_service: js-agent.newrelic.com
asset_path: |
internal/dev-released.js \
internal/dev-latest.js \
internal/dev-experiments.js \
internal/dev-postamble.js \
internal/staging-released.js \
internal/staging-latest.js \
internal/staging-experiments.js \
internal/staging-postamble.js \
internal/prod-released.js \
internal/prod-postamble.js \
internal/eu-prod-released.js \
internal/eu-prod-postamble.js
# Note: NPM deprecation of old versions is now handled by npm-operations.yml
# on its own schedule (daily at 4AM)
# TODO: Need to add a job for cleaning up experiments to run nightly