diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 00000000..fa922ec3 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,18 @@ +name: Check Pull requests +on: push +jobs: + Check-PullRequests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + - name: Install dependencies + run: pnpm install + - name: Build packages + run: pnpm --filter "./packages/**" build + - name: Build sample sites + run: pnpm --filter "./samples/**" build + - name: Run tests + run: pnpm --filter "./packages/**" test diff --git a/package.json b/package.json index 8e9aae39..50b0ce8a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "private": "true", "scripts": { "build": "pnpm --filter \"./packages/**\" build", + "build:samples": "pnpm --filter \"./samples/**\" build", "clean:all": "pnpm -r clean", "test": "echo \"Error: no test specified\" && exit 1", "publish:all": "pnpm --filter \"./packages/**\" publish --access public --no-git-checks" diff --git a/samples/fx-integration/src/app/en/[...slug]/page.tsx b/samples/fx-integration/src/app/en/[...slug]/page.tsx index fb34eb22..75e64f3f 100644 --- a/samples/fx-integration/src/app/en/[...slug]/page.tsx +++ b/samples/fx-integration/src/app/en/[...slug]/page.tsx @@ -9,7 +9,7 @@ type Props = { }>; }; -function returnFirst(content: any[]) { +function returnFirst(content: T[]) { if (content.length === 0) { notFound(); } diff --git a/samples/fx-integration/src/app/registration/page.tsx b/samples/fx-integration/src/app/registration/page.tsx index edc220f7..977c072e 100644 --- a/samples/fx-integration/src/app/registration/page.tsx +++ b/samples/fx-integration/src/app/registration/page.tsx @@ -1,6 +1,8 @@ import { trackRegistration } from '@/lib/fx'; +import { connection } from 'next/server'; export default async function Page() { + await connection(); await trackRegistration(); return

Thanks for registration!

; diff --git a/samples/fx-integration/src/components/FxCallout.tsx b/samples/fx-integration/src/components/FxCallout.tsx index ed983e62..1207b4c1 100644 --- a/samples/fx-integration/src/components/FxCallout.tsx +++ b/samples/fx-integration/src/components/FxCallout.tsx @@ -20,6 +20,6 @@ type Props = { opti: Infer; }; -export default function FxCallout({ opti }: Props) { +export default function FxCallout({}: Props) { return <>; } diff --git a/samples/graph-webhooks-cache-invalidation/src/app/preview/page.tsx b/samples/graph-webhooks-cache-invalidation/src/app/preview/page.tsx index ff6df279..cbac92e2 100644 --- a/samples/graph-webhooks-cache-invalidation/src/app/preview/page.tsx +++ b/samples/graph-webhooks-cache-invalidation/src/app/preview/page.tsx @@ -3,7 +3,7 @@ import React from 'react'; export default function Page() { return (
- This sample site doesn't have Live Preview enabled. Go to{' '} + This sample site doesn't have Live Preview enabled. Go to{' '} /en {' '}