From 0c485c3e4b0ddfbd42d95ff2c52f18a40cdc7d28 Mon Sep 17 00:00:00 2001 From: Ethan Bickel Date: Mon, 14 Oct 2024 09:28:55 -0500 Subject: [PATCH] fix format check output (#249) * fix format check output * fix passing badly formatted files * attempt at fixing output * attempt 2 at fixing bad output * attempt 3 at fixing bad output * add quotes * fix where it outputs * test env * remove quotes so that stuff gets passed right, maybe * i don't * remove sed cause not needed in ci env * test something * export instead * combine scripts * fix bad formatting * bad variable * Revert "fix bad formatting" This reverts commit e9843c34ab0a4ea9e3d5e8f4550875c103500660. * Revert "Revert "fix bad formatting"" This reverts commit 5ccab2b3fb51732b6684a0728da40ef89c564f71. --- .github/workflows/generateCheck.sh | 4 +++- .github/workflows/prettierCheck.yml | 10 +--------- src/app/layout.tsx | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generateCheck.sh b/.github/workflows/generateCheck.sh index 8d1ba0b0..f073a72c 100755 --- a/.github/workflows/generateCheck.sh +++ b/.github/workflows/generateCheck.sh @@ -1,4 +1,6 @@ -if [ $status == 'success' ]; then +files=$(npx prettier . -l) +status=$? +if [ $status == 0 ]; then echo "## Formatting Check passed 🥳" >>$GITHUB_STEP_SUMMARY echo "All files are formatted correctly" >>$GITHUB_STEP_SUMMARY exit 0 diff --git a/.github/workflows/prettierCheck.yml b/.github/workflows/prettierCheck.yml index 108ca2ca..d248dbe9 100644 --- a/.github/workflows/prettierCheck.yml +++ b/.github/workflows/prettierCheck.yml @@ -12,13 +12,5 @@ jobs: cache: 'npm' - name: Run npm install run: npm ci - - name: Run prettier - id: prettier - continue-on-error: true - run: | - files=`npx prettier . -l` - echo files=$files >> "$GITHUB_ENV" - - name: generate errors/summary + - name: Run prettier & generate problems run: .github/workflows/generateCheck.sh - env: - status: ${{ steps.prettier.outcome }} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index d2bee2c4..52a741a0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -7,7 +7,7 @@ import { TRPCReactProvider } from '@src/trpc/react'; import Sidebar from '@src/components/nav/Sidebar'; import { type Metadata } from 'next'; -import { GoogleAnalytics } from '@next/third-parties/google' +import { GoogleAnalytics } from '@next/third-parties/google'; const inter = Inter({ subsets: ['latin'],