diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ea8c84c3..1b7ade67 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,15 +19,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Install bun uses: oven-sh/setup-bun@v2 - name: Install dependencies run: bun install - - name: Install dependencies # (assuming your project has dependencies) - run: bun install # You can use npm/yarn/pnpm instead if you prefer + - name: Run linter + run: bun run lint - name: Check for changes id: verify-changed-files @@ -45,4 +47,4 @@ jobs: git config --local user.name "GitHub Action" git add . git commit -m "🔧 Auto-fix: ESLint formatting and fixes" - git push + git push \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b6fe977..f22358bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,16 +13,18 @@ on: jobs: test: runs-on: ubuntu-latest + env: + THUMBNAIL_URL: ${{ vars.THUMBNAIL_URL }} steps: - name: Checkout uses: actions/checkout@v4 - + - name: Install bun uses: oven-sh/setup-bun@v2 - - - name: Install dependencies # (assuming your project has dependencies) - run: bun install # You can use npm/yarn/pnpm instead if you prefer + + - name: Install dependencies + run: bun install - name: Run tests - run: bun run test + run: bun test \ No newline at end of file diff --git a/apps/backend/src/lib/initializeSwagger.spec.ts b/apps/backend/src/lib/initializeSwagger.spec.ts index 8792226b..25fa9b42 100644 --- a/apps/backend/src/lib/initializeSwagger.spec.ts +++ b/apps/backend/src/lib/initializeSwagger.spec.ts @@ -34,7 +34,7 @@ describe('initializeSwagger', () => { ); expect(SwaggerModule.setup).toHaveBeenCalledWith( - 'api/doc', + 'docs', app, expect.any(Object), { diff --git a/apps/frontend/src/modules/browse/components/client/context/FeaturedSongs.context.tsx b/apps/frontend/src/modules/browse/components/client/context/FeaturedSongs.context.tsx index 8b32d8a1..fa314966 100644 --- a/apps/frontend/src/modules/browse/components/client/context/FeaturedSongs.context.tsx +++ b/apps/frontend/src/modules/browse/components/client/context/FeaturedSongs.context.tsx @@ -1,14 +1,12 @@ 'use client'; -import { - FeaturedSongsDtoType, - SongPreviewDtoType, - TimespanType, -} from '@nbw/database'; +import { TIMESPANS } from '@nbw/config'; +import { type FeaturedSongsDto, type SongPreviewDto } from '@nbw/database'; import { createContext, useContext, useEffect, useState } from 'react'; +type TimespanType = (typeof TIMESPANS)[number]; type FeaturedSongsContextType = { - featuredSongsPage: SongPreviewDtoType[]; + featuredSongsPage: SongPreviewDto[]; timespan: TimespanType; setTimespan: (timespan: TimespanType) => void; timespanEmpty: Record; @@ -23,14 +21,14 @@ export function FeaturedSongsProvider({ initialFeaturedSongs, }: { children: React.ReactNode; - initialFeaturedSongs: FeaturedSongsDtoType; + initialFeaturedSongs: FeaturedSongsDto; }) { // Featured songs - const [featuredSongs] = useState(initialFeaturedSongs); + const [featuredSongs] = useState(initialFeaturedSongs); - const [featuredSongsPage, setFeaturedSongsPage] = useState< - SongPreviewDtoType[] - >(initialFeaturedSongs.week); + const [featuredSongsPage, setFeaturedSongsPage] = useState( + initialFeaturedSongs.week, + ); const [timespan, setTimespan] = useState('week'); @@ -43,7 +41,6 @@ export function FeaturedSongsProvider({ ); useEffect(() => { - // eslint-disable-next-line react-hooks/exhaustive-deps setFeaturedSongsPage(featuredSongs[timespan]); }, [featuredSongs, timespan]); diff --git a/apps/frontend/src/modules/shared/components/client/ads/DetectAdBlock.tsx b/apps/frontend/src/modules/shared/components/client/ads/DetectAdBlock.tsx index 99a97d38..0f066d3a 100644 --- a/apps/frontend/src/modules/shared/components/client/ads/DetectAdBlock.tsx +++ b/apps/frontend/src/modules/shared/components/client/ads/DetectAdBlock.tsx @@ -1,7 +1,6 @@ const DetectAdBlock = () => { return ( <> - {/* eslint-disable-next-line @next/next/no-sync-scripts */}