cf6bde238c
Initialize SvelteKit project with Svelte 5, TypeScript strict, Tailwind CSS v4, shadcn-svelte, Prisma + SQLite, Vitest, ESLint, Prettier. Add Docker multi-stage build, docker-compose, and Gitea Actions CI pipeline.
65 lines
1.2 KiB
YAML
65 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
jobs:
|
|
lint-and-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Generate Prisma client
|
|
run: npx prisma generate
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Format check
|
|
run: npm run format:check
|
|
|
|
- name: Type check
|
|
run: npm run check
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: lint-and-check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Generate Prisma client
|
|
run: npx prisma generate
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
docker-build:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t web-app-launcher:ci .
|