Skip to content

fix(build): correct writeFileSync usage; harden is-client env check; cleanup map→forEach #6129

fix(build): correct writeFileSync usage; harden is-client env check; cleanup map→forEach

fix(build): correct writeFileSync usage; harden is-client env check; cleanup map→forEach #6129

Workflow file for this run

name: Ensure PR
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unitTest:
name: Unit Test
strategy:
matrix:
os: [ubuntu-latest]
node-version: [lts/*]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn jest
lint:
name: Lint
strategy:
matrix:
os: [ubuntu-latest]
node-version: [lts/*]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn lint:js
- run: yarn lint:markdown
proseLint:
name: Proselint
strategy:
matrix:
os: [ubuntu-latest]
node-version: [lts/*]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install MDX Parser
run: npm install -g mdx2vast
- name: Vale
uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
with:
files: src/content
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
testAndCheck:
name: E2E test and link check
strategy:
matrix:
os: [ubuntu-latest]
node-version: [lts/*]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- name: Enable webpack persistent caching
uses: ./.github/actions/webpack-persistent-cache
- name: Cypress run
uses: cypress-io/github-action@7ef72e250a9e564efb4ed4c2433971ada4cc38b4 # v6.10.4
with:
browser: chrome
config-file: cypress.config.js
build: yarn build
start: yarn serve-dist
command: yarn cypress:run
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: yarn lint:links