Skip to content

ci: add examples job #2000

ci: add examples job

ci: add examples job #2000

Workflow file for this run

name: CI
on:
push:
branches:
- main
- next
pull_request:
merge_group:
branches:
- main
- next
types:
- checks_requested
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check for unformatted files
run: npm run format:diff
lint-pkg:
name: 'lint:pkg'
runs-on: ubuntu-latest
strategy:
matrix:
workspace: [packages/doctocat, packages/doctocat-nextjs]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build -- --filter './packages/*'
- name: Run arethetypeswrong
working-directory: ${{ matrix.workspace }}
run: npx @arethetypeswrong/cli --pack .
- name: Run publint
working-directory: ${{ matrix.workspace }}
run: npx publint . --strict
type-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build -- --filter './packages/*'
- name: Type check
run: npm run type-check
examples:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build