Skip to content

Commit

Permalink
Add GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
scastiel committed Jan 16, 2024
1 parent d809e10 commit 6b6d58e
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/components/ui

This comment has been minimized.

Copy link
@shynst

shynst Mar 7, 2024

Contributor

Why shouldn't we run prettier on src/components/ui?

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"check-types": "tsc --noEmit",
"check-formatting": "prettier -c src",
"postinstall": "prisma migrate deploy && prisma generate",
"build-image": "./scripts/build-image.sh",
"start-container": "docker compose --env-file container.env up"
},
"dependencies": {
"@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-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.5",
Expand Down
7 changes: 5 additions & 2 deletions src/app/groups/[groupId]/expenses/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@/components/ui/card'
import { Skeleton } from '@/components/ui/skeleton'
import { getGroup, getGroupExpenses } from '@/lib/api'
import { Download, DownloadCloud, Plus } from 'lucide-react'
import { Download, Plus } from 'lucide-react'
import { Metadata } from 'next'
import Link from 'next/link'
import { notFound } from 'next/navigation'
Expand Down Expand Up @@ -40,7 +40,10 @@ export default async function GroupExpensesPage({
</CardHeader>
<CardHeader className="p-4 sm:p-6 flex flex-row space-y-0 gap-2">
<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" />
</Link>
</Button>
Expand Down
5 changes: 4 additions & 1 deletion src/components/donation-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ function DonationForm({ donationUrl }: Props) {
</p>
</div>
<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">
<Heart className="w-4 h-4 mr-2" /> Support us
</a>
Expand Down

0 comments on commit 6b6d58e

Please sign in to comment.