mirror of
https://github.com/spliit-app/spliit.git
synced 2025-12-06 01:19:29 +01:00
Add GitHub actions
This commit is contained in:
36
.github/workflows/ci.yml
vendored
Normal file
36
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
pull_request:
|
||||||
|
branches: ['main']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
|
||||||
|
- name: Generate Prisma client
|
||||||
|
run: npx prisma generate
|
||||||
|
|
||||||
|
- name: Check TypeScript types
|
||||||
|
run: npm run check-types
|
||||||
|
|
||||||
|
- name: Check ESLint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Check Prettier formatting
|
||||||
|
run: npm run check-formatting
|
||||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
src/components/ui
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -10,7 +10,7 @@
|
|||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.3.2",
|
"@hookform/resolvers": "^3.3.2",
|
||||||
"@prisma/client": "5.6.0",
|
"@prisma/client": "^5.6.0",
|
||||||
"@radix-ui/react-checkbox": "^1.0.4",
|
"@radix-ui/react-checkbox": "^1.0.4",
|
||||||
"@radix-ui/react-collapsible": "^1.0.3",
|
"@radix-ui/react-collapsible": "^1.0.3",
|
||||||
"@radix-ui/react-dialog": "^1.0.5",
|
"@radix-ui/react-dialog": "^1.0.5",
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
|
"check-types": "tsc --noEmit",
|
||||||
|
"check-formatting": "prettier -c src",
|
||||||
"postinstall": "prisma migrate deploy && prisma generate",
|
"postinstall": "prisma migrate deploy && prisma generate",
|
||||||
"build-image": "./scripts/build-image.sh",
|
"build-image": "./scripts/build-image.sh",
|
||||||
"start-container": "docker compose --env-file container.env up"
|
"start-container": "docker compose --env-file container.env up"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.3.2",
|
"@hookform/resolvers": "^3.3.2",
|
||||||
"@prisma/client": "5.6.0",
|
"@prisma/client": "^5.6.0",
|
||||||
"@radix-ui/react-checkbox": "^1.0.4",
|
"@radix-ui/react-checkbox": "^1.0.4",
|
||||||
"@radix-ui/react-collapsible": "^1.0.3",
|
"@radix-ui/react-collapsible": "^1.0.3",
|
||||||
"@radix-ui/react-dialog": "^1.0.5",
|
"@radix-ui/react-dialog": "^1.0.5",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
} from '@/components/ui/card'
|
} from '@/components/ui/card'
|
||||||
import { Skeleton } from '@/components/ui/skeleton'
|
import { Skeleton } from '@/components/ui/skeleton'
|
||||||
import { getGroup, getGroupExpenses } from '@/lib/api'
|
import { getGroup, getGroupExpenses } from '@/lib/api'
|
||||||
import { Download, DownloadCloud, Plus } from 'lucide-react'
|
import { Download, Plus } from 'lucide-react'
|
||||||
import { Metadata } from 'next'
|
import { Metadata } from 'next'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { notFound } from 'next/navigation'
|
import { notFound } from 'next/navigation'
|
||||||
@@ -40,7 +40,10 @@ export default async function GroupExpensesPage({
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardHeader className="p-4 sm:p-6 flex flex-row space-y-0 gap-2">
|
<CardHeader className="p-4 sm:p-6 flex flex-row space-y-0 gap-2">
|
||||||
<Button variant="secondary" size="icon" asChild>
|
<Button variant="secondary" size="icon" asChild>
|
||||||
<Link href={`/groups/${groupId}/expenses/export/json`} target="_blank">
|
<Link
|
||||||
|
href={`/groups/${groupId}/expenses/export/json`}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
<Download className="w-4 h-4" />
|
<Download className="w-4 h-4" />
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -112,7 +112,10 @@ function DonationForm({ donationUrl }: Props) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 text-center">
|
<div className="mt-4 text-center">
|
||||||
<Button asChild className="bg-pink-700 hover:bg-pink-600 dark:bg-pink-500 dark:hover:bg-pink-600">
|
<Button
|
||||||
|
asChild
|
||||||
|
className="bg-pink-700 hover:bg-pink-600 dark:bg-pink-500 dark:hover:bg-pink-600"
|
||||||
|
>
|
||||||
<a href={donationUrl} target="_blank">
|
<a href={donationUrl} target="_blank">
|
||||||
<Heart className="w-4 h-4 mr-2" /> Support us
|
<Heart className="w-4 h-4 mr-2" /> Support us
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user