Skip to content

Commit 582aaa4

Browse files
authored
Merge pull request #40 from hasparus/new-landing--fixes
new landing — fixes
2 parents f76639c + b607bad commit 582aaa4

38 files changed

+599
-1059
lines changed

.github/workflows/docs-validation.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,53 @@ on:
1212
- main
1313

1414
jobs:
15-
link-check:
16-
name: Broken link checker
17-
runs-on: ubuntu-latest
15+
link-check:
16+
name: Broken link checker
17+
runs-on: ubuntu-latest
1818

19-
steps:
20-
- name: Checkout code
21-
uses: actions/checkout@v4
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
2222

23-
- name: Set up Node.js
24-
uses: actions/setup-node@v4
25-
with:
26-
node-version: "20"
27-
cache: "pnpm"
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: "20"
27+
cache: "pnpm"
2828

29-
- name: Install dependencies
30-
run: pnpm install --frozen-lockfile
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
3131

32-
- name: Build static site
33-
run: pnpm build
32+
- name: Build static site
33+
run: pnpm build
3434

35-
- name: Set up Rust
36-
uses: actions-rs/toolchain@v1
37-
with:
38-
toolchain: stable
35+
- name: Set up Rust
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
3939

40-
- name: Install lychee
41-
run: cargo install lychee
40+
- name: Install lychee
41+
run: cargo install lychee
4242

43-
- name: Check links
44-
run: lychee --verbose --no-progress './out/**/*.html'
43+
- name: Check links
44+
run: lychee --verbose --no-progress './out/**/*.html'
4545

46-
code-validate:
47-
name: Code snippet and GraphQL validation
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v4
46+
code-validate:
47+
name: Code snippet and GraphQL validation
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
5151

52-
- uses: actions/setup-node@v4
53-
with:
54-
node-version: "20"
55-
cache: "pnpm"
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: "20"
55+
cache: "pnpm"
5656

57-
- name: Install dependencies
58-
run: pnpm install --frozen-lockfile
57+
- name: Install dependencies
58+
run: pnpm install --frozen-lockfile
5959

60-
- name: Run validation w/ annotations
61-
run: pnpm lint:docs:ci
60+
- name: Run validation w/ annotations
61+
run: pnpm lint:docs:ci
6262

63-
- name: Validate code snippets
64-
run: pnpm validate:snippets
63+
- name: Validate code snippets
64+
run: pnpm validate:snippets

package.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"private": true,
66
"packageManager": "[email protected]",
77
"scripts": {
8-
"build": "next build && next-image-export-optimizer",
9-
"serve": "pnpx serve out",
108
"analyze": "ANALYZE=true next build",
9+
"build": "next build && next-image-export-optimizer",
1110
"check:links": "lychee --verbose --no-progress './src/pages/**/*.mdx' --base https://graphql.org",
1211
"dev": "next",
1312
"format": "pnpm format:check --write",
@@ -17,7 +16,9 @@
1716
"lint:docs:ci": "eslint --ignore-path .gitignore src/pages/learn --format eslint-formatter-github",
1817
"postbuild": "next-sitemap",
1918
"prebuild": "tsx src/get-github-info.ts",
20-
"test": "echo \"no tests\" && exit 1",
19+
"serve": "pnpx serve out",
20+
"test": "playwright test",
21+
"test:ui": "playwright test --ui",
2122
"validate:snippets": "node scripts/validate-snippets.js"
2223
},
2324
"dependencies": {
@@ -72,9 +73,13 @@
7273
"unist-util-visit": "^5.0.0",
7374
"use-query-params": "^2.2.1"
7475
},
76+
"optionalDependencies": {
77+
"playwright": "^1.54.2"
78+
},
7579
"devDependencies": {
7680
"@graphql-eslint/eslint-plugin": "4.3.0",
7781
"@next/eslint-plugin-next": "^15.3.3",
82+
"@playwright/test": "^1.54.2",
7883
"@svgr/webpack": "^8.1.0",
7984
"@types/codemirror": "5.60.16",
8085
"@types/hast": "3.0.4",
@@ -99,6 +104,15 @@
99104
"tsx": "^4.19.4",
100105
"typescript": "^5.8.3"
101106
},
107+
"browserslist": [
108+
"chrome >0 and last 2.5 years",
109+
"edge >0 and last 2.5 years",
110+
"safari >0 and last 2.5 years",
111+
"firefox >0 and last 2.5 years",
112+
"and_chr >0 and last 2.5 years",
113+
"and_ff >0 and last 2.5 years",
114+
"ios >0 and last 2.5 years"
115+
],
102116
"pnpm": {
103117
"patchedDependencies": {
104118
"nextra": "patches/nextra.patch"

playwright.config.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { defineConfig, devices } from "@playwright/test"
2+
3+
/**
4+
* @see https://playwright.dev/docs/test-configuration
5+
*/
6+
export default defineConfig({
7+
testDir: "./test/e2e",
8+
outputDir: "./test/out",
9+
fullyParallel: true,
10+
forbidOnly: !!process.env.CI,
11+
retries: process.env.CI ? 2 : 0,
12+
workers: process.env.CI ? 1 : undefined,
13+
reporter: "html",
14+
use: {
15+
baseURL: "http://localhost:3000",
16+
trace: "on-first-retry",
17+
},
18+
19+
projects: [
20+
{
21+
name: "chromium",
22+
use: { ...devices["Desktop Chrome"] },
23+
},
24+
],
25+
26+
webServer: {
27+
command: "pnpm dev",
28+
url: "http://localhost:3000",
29+
reuseExistingServer: !process.env.CI,
30+
},
31+
})

pnpm-lock.yaml

Lines changed: 64 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)