docs: move catalog before workspace in docs #2978
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch on Push and any branches on PR | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: 'Lint on Ubuntu' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Retrieve current Date Time in EST | |
shell: bash | |
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV | |
- name: Current datetime - ${{ env.START_TIME }} | |
run: echo ${{ env.START_TIME }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm itself | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: Set NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Run pnpm install dependencies | |
run: pnpm install | |
- run: pnpm run prettier:check | |
- run: pnpm run ci:lint | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [18, 20, 22] | |
platform: [ubuntu-latest] | |
name: 'Run on Ubuntu / Node${{ matrix.node }}' | |
runs-on: ${{matrix.platform}} | |
if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }} | |
steps: | |
- name: Retrieve current Date Time in EST | |
shell: bash | |
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV | |
- name: Current datetime - ${{ env.START_TIME }} | |
run: echo ${{ env.START_TIME }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # codecov-bash seems to require this | |
- name: Install pnpm itself | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: Set NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- run: node --version | |
- run: pnpm --version | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Run pnpm install dependencies | |
run: pnpm install | |
- name: Cache TypeScript and Vitest | |
uses: actions/cache@v4 | |
with: | |
path: | | |
packages/*/lib | |
packages/*/tsconfig.tsbuildinfo | |
node_modules/.vitest | |
key: vitest-${{ matrix.platform }}-${{ matrix.node }}-${{ github.run_id }} | |
restore-keys: vitest-${{ matrix.platform }}-${{ matrix.node }}- | |
- name: Run all workspace TSC builds | |
run: pnpm build:full | |
- name: Run Vitest unit tests | |
if: | | |
!contains(github.event.head_commit.message, 'chore(release)') | |
env: | |
NO_COLOR: true | |
run: pnpm test | |
- name: Upload test coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
if: | | |
contains(matrix.node, 20) && | |
!contains(github.event.head_commit.message, 'chore(release)') |