Skip to content

2024-11-21 Release #5399

2024-11-21 Release

2024-11-21 Release #5399

Workflow file for this run

name: Tests
on:
- workflow_dispatch
- push
- pull_request
jobs:
# This job lints all files with ESLint.
lint:
if: contains(github.event.head_commit.message, 'skip ci') == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint files
run: npm run lint
- name: Test that components are tree shakable.
run: npm run lint:tree-shaking
# This job runs all Cypress tests.
cypress-test:
if: contains(github.event.head_commit.message, 'skip ci') == false
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
matrix:
os:
- ubuntu-latest
# TODO: Re-enable once a public release of the library is available.
# Mac and windows env's take significantly longer to run.
# - macos-latest
# - windows-latest
node:
- 18
- 20
- 22
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Timezone
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'America/New_York'
timezoneMacos: 'America/New_York'
timezoneWindows: 'Eastern Standard Time'
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Clear Vite cache
run: rm -rf node_modules/.vite/deps
- name: E2E tests on Node v${{ matrix.node }}
if: github.actor == 'dependabot[bot]'
uses: cypress-io/github-action@v6
with:
command: npm run test:e2e
record: false
env:
TZ: America/New_York
- name: Component tests on Node v${{ matrix.node }}
if: github.actor == 'dependabot[bot]'
uses: cypress-io/github-action@v6
with:
# We have already installed everything.
install: false
command: npm run test:component
record: false
env:
TZ: America/New_York
- name: Cypress.io E2E tests on Node v${{ matrix.node }}
if: github.actor != 'dependabot[bot]'
uses: cypress-io/github-action@v6
with:
command: npm run test:e2e -- --record
record: true
tag: node-${{ matrix.node }},e2e
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TZ: America/New_York
- name: Cypress.io component tests on Node v${{ matrix.node }}
if: github.actor != 'dependabot[bot]'
uses: cypress-io/github-action@v6
with:
# We have already installed everything.
install: false
command: npm run test:component -- --record
record: true
tag: node-${{ matrix.node }},component
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TZ: America/New_York
- name: Upload coverage to Codecov
if: github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5.0.2
with:
file: ./coverage/lcov.info
- name: Automatically merge dependabot updates
if: github.event_name == 'pull_request'
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE }}