Skip to content

feat: GH actions

feat: GH actions #52

Workflow file for this run

name: CI
on:
push:
branches: ['main']
pull_request:
types: [opened, synchronize]
env:
# Turborepo
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
# Authentication
AUTH_GITHUB_ID: ${{ secrets.AUTH_GITHUB_ID }}
AUTH_GITHUB_SECRET: ${{ secrets.AUTH_GITHUB_SECRET }}
AUTH_GOOGLE_ID: ${{ secrets.AUTH_GOOGLE_ID }}
AUTH_GOOGLE_SECRET: ${{ secrets.AUTH_GOOGLE_SECRET }}
AUTH_GOOGLE_CODE_VERIFIER: ${{ secrets.AUTH_GOOGLE_CODE_VERIFIER }}
# Uploadthing
UPLOADTHING_SECRET: ${{ secrets.UPLOADTHING_SECRET }}
UPLOADTHING_APP_ID: ${{ secrets.UPLOADTHING_APP_ID }}
# Unkey
UNKEY_ROOT_KEY: ${{ secrets.UNKEY_ROOT_KEY }}
jobs:
code-quality:
name: Code Quality Checks
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: setup volta
uses: volta-cli/action@v4
- name: get node version
run: node --version
- name: install pnpm
uses: pnpm/action-setup@v3
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: format
run: pnpm run format:check
- name: lint spellcheck
run: pnpm run lint:spell
- name: lint markdown
run: pnpm run lint:md
- name: lint code
run: pnpm turbo lint
- name: typecheck
run: pnpm turbo typecheck