feat: script to validate all markdown validation errors #6198
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: | |
push: | |
branches: | |
- "**" | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: "buildwithfern" | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }} | |
WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }} | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # This helps turbo resolve changes faster | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Codegen | |
run: | | |
npm install -g fern-api | |
- name: Compile and build | |
run: pnpm turbo compile codegen build | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }} | |
WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }} | |
- name: Check dependencies | |
run: pnpm depcheck | |
- name: Check format | |
run: pnpm format:check | |
lint: | |
runs-on: CLI | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # This helps turbo resolve changes faster | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Lint monorepo | |
run: pnpm lint:monorepo | |
- name: Lint style | |
run: pnpm turbo lint:style | |
- name: eslint | |
run: pnpm lint:eslint | |
visual-testing: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Run Chromatic | |
uses: chromaui/action@latest | |
# Chromatic CI config: https://www.chromatic.com/docs/github-actions/ | |
with: | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
workingDir: packages/ui/components | |
onlyChanged: true | |
fern-generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # This helps turbo resolve changes faster | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: fernapi | |
password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }} | |
- name: Codegen | |
run: | | |
pnpm fern generate --local --api fdr | |
pnpm turbo --filter=@fern-platform/fdr codegen | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # This helps turbo resolve changes faster | |
- name: Install | |
uses: ./.github/actions/install | |
- name: 🧪 Build generator-cli | |
run: | | |
pnpm turbo compile | |
pnpm --filter=@fern-api/generator-cli dist:cli | |
- name: Run tests | |
run: pnpm test | |
env: | |
CI: true | |
- name: Install Docker Compose | |
run: | | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
docker-compose --version | |
- name: Run tests against local FDR | |
run: | | |
cd servers/fdr | |
pnpm test:local | |
env: | |
CI: true | |
check-docs-release-is-allowed: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # This helps turbo resolve changes faster | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Check release blockers | |
run: pnpm check-docs-release-blockers |