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 b48ccd3
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
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: 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
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"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"
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 b48ccd3

Please sign in to comment.