Skip to content

ci: put matrix in strategy field #1994

ci: put matrix in strategy field

ci: put matrix in strategy field #1994

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
- name: Check published types
uses: './.github/actions/arethetypeswrong'
with:
workspace: ${{ matrix.workspace }}
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
- name: Type check
run: npm run type-check