You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
910 B
43 lines
910 B
name: 'CI'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: ['prod']
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: ['ubuntu-latest']
|
|
node-version: ['16.x']
|
|
steps:
|
|
- name: 'Checkout repository'
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 'Use Node.js v${{ matrix.node-version }}'
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: 'Install pnpm'
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 6.0.2
|
|
|
|
- name: 'Install Dependencies'
|
|
run: pnpm install
|
|
|
|
- name: 'Build Contentlayer'
|
|
run: NODE_ENV=production npx contentlayer build
|
|
|
|
- name: 'Run Type Checks'
|
|
run: npx tsc --noEmit
|
|
|
|
- name: 'Run Lint and Format Checks'
|
|
run: pnpm run style:all
|
|
|
|
- name: 'Run Tests'
|
|
run: pnpm run test
|
|
|