Skip to content

update: Fixed all the typo errors (#825) #2217

update: Fixed all the typo errors (#825)

update: Fixed all the typo errors (#825) #2217

# This workflow runs a handful of integrity checks.
# when:
# - a pull request is opened against main
# - commits are pushed to main
# what:
# - transpiles ts -> js and builds browser bundles to ensure everything builds without error.
# - runs type checker
# - runs tests (currently in node environment only)
# - runs linter. Will fail if there are any warnings
name: Continuous Integration Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
# used to run action manually via the UI
workflow_dispatch:
jobs:
security-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.17.0
uses: actions/setup-node@v4
with:
node-version: 18.17.0
- run: npm audit
test-with-node:
runs-on: ubuntu-latest
# read more about matrix strategies here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
strategy:
matrix:
node-version: [18.17.0, 20.3.0]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# https://docs.npmjs.com/cli/v8/commands/npm-ci
- run: npm clean-install
# check the licenses allow list to avoid incorrectly licensed dependencies creeping in:
- run: npm run license-check
# builds all bundles
- run: npm run build
# run circular dependency check, job will fail if there is an error
- run: npm run circular-dependency-check
# runs linter. Job will fail if there are any warnings or errors
- run: npm run lint
# runs tests in node environment
- run: npm run test:node
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
test-with-browsers:
# Run browser tests using macOS so that WebKit tests don't fail under a Linux environment
runs-on: macos-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install latest npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build all workspace packages
run: npm run build
- name: Run tests for all packages
run: npm run test:browser