Skip to content

ci: add CI, conventional commits, and auto-labeling workflows #7

ci: add CI, conventional commits, and auto-labeling workflows

ci: add CI, conventional commits, and auto-labeling workflows #7

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
run_e2e:
description: "Run E2E integration tests"
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Lint
run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Tests
run: npm run test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
SKIP_ENV_VALIDATION: "true"
GITHUB_CLIENT_ID: "dummy"
GITHUB_CLIENT_SECRET: "dummy"
E2B_API_KEY: "dummy"
CLERK_SECRET_KEY: "sk_test_dummy"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "pk_test_dGVuZGVyLWhvbmV5YmVlLTU2LmNsZXJrLmFjY291bnRzLmRldiQ"
NEXT_PUBLIC_APP_URL: "http://localhost:3000"
DATABASE_URL: "postgresql://dummy:dummy@localhost:5432/dummy"
e2e:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_e2e }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run E2E Tests
run: npm run test:e2e
env:
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
CLERK_TEST_USER_ID: ${{ secrets.CLERK_TEST_USER_ID }}
GITHUB_PAT: ${{ secrets.E2E_GITHUB_PAT }}