Skip to content

Update docs and config for rules and keywords #189

Update docs and config for rules and keywords

Update docs and config for rules and keywords #189

Workflow file for this run

---
name: Development workflow
on:
pull_request:
branches:
- main
paths-ignore:
- 'website/**'
- '**/*.md'
- '**/*.mdx'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: ⎔ Setup node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
cache: npm
- name: 📥 Download deps
run: npm ci
- name: 🧪 Run lint
run: npm run lint
build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: read # for actions/checkout to fetch code
runs-on: ${{ matrix.os }}
needs: lint
strategy:
fail-fast: false
matrix:
node:
- 18
- 20
- 22
- 24
os: [ubuntu-latest, windows-latest]
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: ⬇️ Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: ⎔ Setup node ${{ matrix.node }}
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ matrix.node }}
cache: npm
- name: 📥 Download deps
run: npm ci
- name: 🏗 Build
run: npm run build
- name: Ensure no git changes
run: git diff --exit-code
- name: Run tests
if: matrix.os != 'ubuntu-latest'
uses: nick-invision/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
timeout_minutes: 20
max_attempts: 3
command: npm run test
- name: Run coverage
if: matrix.node == '20' && matrix.os == 'ubuntu-latest'
uses: nick-invision/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
timeout_minutes: 20
max_attempts: 3
command: npm run test:coverage
- name: ⬆️ Upload coverage to Codecov
if: matrix.node == '20' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./coverage/coverage-final.json
name: codecov-dev
token: ${{ secrets.CODECOV_TOKEN }}