Skip to content

Commit 366365c

Browse files
committed
ci: run playwright on github actions
. . .
1 parent 57ec4cb commit 366365c

27 files changed

+2795
-684
lines changed

.github/workflows/playwright.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
branches: [ main, master ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Install Playwright Browsers
19+
run: npx playwright install --with-deps
20+
- name: Run Playwright tests
21+
run: npx playwright test
22+
- uses: actions/upload-artifact@v4
23+
if: ${{ !cancelled() }}
24+
with:
25+
name: playwright-report
26+
path: playwright-report/
27+
retention-days: 30

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ __pycache__
22
.pdm-python
33
.next
44
node_modules
5-
apps/librelingo-web/out/
65
playwright-report
76
test-results
87
neovide_backtraces.log
9-
courses/
10-
!courses/test-1
11-
!courses/test-2
128
**/*.tsbuildinfo
9+
/apps/librelingo-web/out/
10+
/apps/librelingo-web/src/courses/*
11+
/courses/*
12+
!/apps/librelingo-web/src/courses/test-*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { listAvailableCourses } from "@/data/course"
2+
3+
export async function generateStaticParams() {
4+
const courses = await listAvailableCourses()
5+
6+
return courses.map((course) => ({
7+
sourceLanguageCode: course.uiLanguage,
8+
targetLanguageCode: course.languageCode,
9+
}))
10+
}
11+
12+
export default function CourseHomePage() {
13+
return <h1>Hello world</h1>
14+
}

apps/librelingo-web/src/app/page.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Metadata } from 'next'
22
import CourseCard from './CourseCard';
3-
import { Course, listAllCourses } from '@/data/course';
3+
import { Course, listAvailableCourses } from '@/data/course';
44

55

66

@@ -10,8 +10,7 @@ export const metadata: Metadata = {
1010
}
1111

1212
export default async function Home() {
13-
const courseData = await listAllCourses()
14-
console.log(courseData)
13+
const courseData = await listAvailableCourses()
1514

1615
return (
1716
<>

apps/librelingo-web/src/courses/config.json

+14-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[
2+
{
3+
"url": "",
4+
"repositoryURL": "",
5+
"paths": {
6+
"yamlFolder": "test-1",
7+
"jsonFolder": "test-1"
8+
},
9+
"deploy": true,
10+
"inProduction": false,
11+
"name": "test-1",
12+
"source": "English",
13+
"target": "Test1",
14+
"description": "Test1 for English speakers"
15+
},
216
{
317
"url": "https://github.com/LibreLingo/LibreLingo-ES-from-EN/archive/refs/heads/main.zip",
418
"repositoryURL": "https://github.com/LibreLingo/LibreLingo-ES-from-EN",
@@ -7,7 +21,6 @@
721
"jsonFolder": "spanish-from-english"
822
},
923
"deploy": true,
10-
"devtoolsEnabled": true,
1124
"inProduction": true,
1225
"name": "spanish-from-english",
1326
"source": "English",
@@ -22,7 +35,6 @@
2235
"jsonFolder": "ladino-from-english"
2336
},
2437
"deploy": false,
25-
"devtoolsEnabled": false,
2638
"inProduction": false,
2739
"name": "ladino-from-english",
2840
"source": "English",
@@ -37,7 +49,6 @@
3749
"jsonFolder": "ladino-from-hebrew"
3850
},
3951
"deploy": false,
40-
"devtoolsEnabled": false,
4152
"inProduction": false,
4253
"name": "ladino-from-hebrew",
4354
"source": "Hebrew",
@@ -52,7 +63,6 @@
5263
"jsonFolder": "ladino-from-spanish"
5364
},
5465
"deploy": false,
55-
"devtoolsEnabled": false,
5666
"inProduction": false,
5767
"name": "ladino-from-spanish",
5868
"source": "Spanish",
@@ -67,7 +77,6 @@
6777
"jsonFolder": "hungarian-from-spanish"
6878
},
6979
"deploy": false,
70-
"devtoolsEnabled": true,
7180
"inProduction": false,
7281
"name": "hungarian-from-spanish",
7382
"source": "Spanish",
@@ -82,7 +91,6 @@
8291
"jsonFolder": "german-from-english"
8392
},
8493
"deploy": true,
85-
"devtoolsEnabled": true,
8694
"inProduction": true,
8795
"name": "german-from-english",
8896
"source": "English",
@@ -97,7 +105,6 @@
97105
"jsonFolder": "basque-from-english"
98106
},
99107
"deploy": false,
100-
"devtoolsEnabled": true,
101108
"inProduction": false,
102109
"name": "basque-from-english",
103110
"source": "English",
@@ -112,7 +119,6 @@
112119
"jsonFolder": "bangla-from-english"
113120
},
114121
"deploy": false,
115-
"devtoolsEnabled": false,
116122
"inProduction": false,
117123
"name": "bangla-from-english",
118124
"source": "English",
@@ -127,7 +133,6 @@
127133
"jsonFolder": "french-from-english"
128134
},
129135
"deploy": false,
130-
"devtoolsEnabled": false,
131136
"inProduction": false,
132137
"name": "french-from-english",
133138
"source": "English",
@@ -142,7 +147,6 @@
142147
"jsonFolder": "parsig-from-english"
143148
},
144149
"deploy": false,
145-
"devtoolsEnabled": false,
146150
"inProduction": false,
147151
"name": "parsig-from-english",
148152
"source": "English",
@@ -157,7 +161,6 @@
157161
"jsonFolder": "houma-from-english"
158162
},
159163
"deploy": false,
160-
"devtoolsEnabled": false,
161164
"inProduction": false,
162165
"name": "houma-from-english",
163166
"source": "English",
@@ -172,7 +175,6 @@
172175
"jsonFolder": "brazilian-portuguese-from-english"
173176
},
174177
"deploy": false,
175-
"devtoolsEnabled": false,
176178
"inProduction": false,
177179
"name": "brazilian-portuguese-from-english",
178180
"source": "English",
@@ -187,7 +189,6 @@
187189
"jsonFolder": "neolatin-from-english"
188190
},
189191
"deploy": false,
190-
"devtoolsEnabled": false,
191192
"inProduction": false,
192193
"name": "neolatin-from-english",
193194
"source": "English",
@@ -202,7 +203,6 @@
202203
"jsonFolder": "occitan-auvergnat-from-french"
203204
},
204205
"deploy": false,
205-
"devtoolsEnabled": false,
206206
"inProduction": false,
207207
"name": "occitan-auvergnat-from-french",
208208
"source": "French",
@@ -217,7 +217,6 @@
217217
"jsonFolder": "kabyle-from-french"
218218
},
219219
"deploy": false,
220-
"devtoolsEnabled": false,
221220
"inProduction": false,
222221
"name": "kabyle-from-french",
223222
"source": "French",
@@ -232,7 +231,6 @@
232231
"jsonFolder": "dutch-from-english"
233232
},
234233
"deploy": true,
235-
"devtoolsEnabled": false,
236234
"inProduction": true,
237235
"name": "dutch-from-english",
238236
"source": "English",

0 commit comments

Comments
 (0)