Fix fake Clerk key used in CI #106
Workflow file for this run
This file contains hidden or 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: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: ${{ matrix.project }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- project: create-convex | |
- project: template-astro | |
use_bun: true | |
- project: template-bare | |
- project: template-component | |
- project: template-component/example | |
- project: template-nextjs | |
- project: template-nextjs-clerk | |
- project: template-nextjs-clerk-shadcn | |
- project: template-nextjs-convexauth | |
- project: template-nextjs-convexauth-shadcn | |
- project: template-nextjs-lucia-shadcn | |
- project: template-nextjs-shadcn | |
- project: template-react-vite | |
- project: template-react-vite-clerk | |
- project: template-react-vite-clerk-shadcn | |
- project: template-react-vite-convexauth | |
- project: template-react-vite-convexauth-shadcn | |
- project: template-react-vite-shadcn | |
- project: template-tanstack-start | |
- project: template-tanstack-start-clerk | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
cache-dependency-path: "${{ matrix.use_bun == true && format('{0}/bun.lockb', matrix.project) || format('{0}/package-lock.json', matrix.project) }}" | |
- name: Build parent project (for the component template) | |
if: matrix.project == 'template-component/example' | |
working-directory: template-component | |
run: | | |
npm ci | |
npm run build | |
- name: Install NPM dependencies | |
if: matrix.use_bun != true | |
working-directory: ${{ matrix.project }} | |
run: npm ci | |
- name: Setup Bun | |
if: matrix.use_bun == true | |
uses: oven-sh/setup-bun@v1 | |
- name: Install Bun dependencies | |
if: matrix.use_bun == true | |
working-directory: ${{ matrix.project }} | |
run: bun install --frozen-lockfile | |
- name: Run build (if available) | |
working-directory: ${{ matrix.project }} | |
run: | | |
if jq -e '.scripts.build' package.json > /dev/null; then | |
npm run build | |
else | |
echo "No build script found, skipping" | |
fi | |
env: | |
CONVEX_URL: "https://placeholder.convex.cloud" | |
NEXT_PUBLIC_CONVEX_URL: "https://placeholder.convex.cloud" | |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "pk_test_Y2xlcmsuYWJjZWYuMTIzNDUuZGV2LmxjbGNsZXJrLmNvbSQ" # not a real key | |
- name: Run typecheck (if available) | |
working-directory: ${{ matrix.project }} | |
run: | | |
if jq -e '.scripts.typecheck' package.json > /dev/null; then | |
npm run typecheck | |
else | |
echo "No typecheck script found, skipping" | |
fi | |
- name: Run lint (if available) | |
working-directory: ${{ matrix.project }} | |
run: | | |
if jq -e '.scripts.lint' package.json > /dev/null; then | |
npm run lint | |
else | |
echo "No lint script found, skipping" | |
fi | |
- name: Run tests (if available) | |
# I would like to run tests but it seems like there is an error in the template-component test running? | |
if: matrix.project != 'template-component' | |
working-directory: ${{ matrix.project }} | |
run: | | |
if jq -e '.scripts.test' package.json > /dev/null; then | |
npm run test | |
else | |
echo "No test script found, skipping" | |
fi |