File tree 5 files changed +41
-19
lines changed
app/api/auth/[...nextauth]
5 files changed +41
-19
lines changed Original file line number Diff line number Diff line change 8
8
jobs :
9
9
lint :
10
10
name : Eslint, Typescript, prettier and test
11
-
12
11
runs-on : ubuntu-latest
13
-
14
12
steps :
15
13
- uses : actions/checkout@v2
16
-
17
14
- name : Install dependencies
18
15
run : npm install
19
-
20
16
- name : ESLint
21
17
run : npm run lint
22
-
23
18
- name : Type check
24
19
run : npm run typecheck
25
-
26
20
- name : Prettier
27
21
run : npm run format:check
28
-
29
22
- name : Tests
30
23
run : npm run test
Original file line number Diff line number Diff line change
1
+ name : Playwright Tests
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ - master
7
+ - develop
8
+ pull_request : null
9
+ workflow_dispatch : null
10
+
11
+ jobs :
12
+ test :
13
+ timeout-minutes : 60
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+ - uses : actions/setup-node@v3
18
+ - name : Install dependencies
19
+ run : npm ci
20
+ - name : Install playwright browsers
21
+ run : npx playwright install --with-deps
22
+ - name : Run tests
23
+ run : npm run e2e
24
+ - uses : actions/upload-artifact@v3
25
+ if : always()
26
+ with :
27
+ name : playwright-report
28
+ path : playwright-report/
29
+ retention-days : 30
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default defineConfig({
25
25
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
26
26
use : {
27
27
/* Base URL to use in actions like `await page.goto('/')`. */
28
- baseURL : 'http://localhost :3000' ,
28
+ baseURL : 'http://127.0.0.1 :3000' ,
29
29
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
30
30
trace : 'on-first-retry' ,
31
31
} ,
@@ -69,9 +69,9 @@ export default defineConfig({
69
69
] ,
70
70
71
71
/* Run your local dev server before starting the tests */
72
- // webServer: {
73
- // command: 'npm run start ',
74
- // url: 'http://127.0.0.1:3000',
75
- // reuseExistingServer: !process.env.CI,
76
- // },
72
+ webServer : {
73
+ command : 'npm run dev ' ,
74
+ url : 'http://127.0.0.1:3000' ,
75
+ reuseExistingServer : ! process . env . CI ,
76
+ } ,
77
77
} ) ;
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import { env } from '@/env.mjs';
6
6
export const authOptions : NextAuthOptions = {
7
7
providers : [
8
8
GitHubProvider ( {
9
- clientId : env . NEXT_PUBLIC_GITHUB_ID ,
10
- clientSecret : env . NEXT_PUBLIC_GITHUB_SECRET ,
9
+ clientId : env . NEXT_PUBLIC_GITHUB_ID || '' ,
10
+ clientSecret : env . NEXT_PUBLIC_GITHUB_SECRET || '' ,
11
11
} ) ,
12
12
] ,
13
13
} ;
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import { z } from 'zod';
3
3
4
4
export const env = createEnv ( {
5
5
server : {
6
- NEXT_PUBLIC_SITE_URL : z . string ( ) . url ( ) ,
7
- NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION_ID : z . string ( ) . min ( 1 ) ,
8
- NEXT_PUBLIC_GITHUB_ID : z . string ( ) . min ( 1 ) ,
9
- NEXT_PUBLIC_GITHUB_SECRET : z . string ( ) . min ( 1 ) ,
6
+ NEXT_PUBLIC_SITE_URL : z . string ( ) . url ( ) . optional ( ) ,
7
+ NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION_ID : z . string ( ) . min ( 1 ) . optional ( ) ,
8
+ NEXT_PUBLIC_GITHUB_ID : z . string ( ) . min ( 1 ) . optional ( ) ,
9
+ NEXT_PUBLIC_GITHUB_SECRET : z . string ( ) . min ( 1 ) . optional ( ) ,
10
10
} ,
11
11
runtimeEnv : {
12
12
NEXT_PUBLIC_SITE_URL : process . env . NEXT_PUBLIC_SITE_URL ,
You can’t perform that action at this time.
0 commit comments