File tree 9 files changed +57
-27
lines changed
9 files changed +57
-27
lines changed Original file line number Diff line number Diff line change 35
35
run : pnpm install --frozen-lockfile
36
36
- name : Check formatting
37
37
run : pnpm format:check
38
-
38
+ tests :
39
+ runs-on : ubuntu-latest
40
+ steps :
41
+ - uses : actions/checkout@v4
42
+ with :
43
+ ref : ${{ github.event.pull_request.head.sha }}
44
+ - uses : actions/setup-node@v4
45
+ with :
46
+ node-version : 20
47
+ - name : Install corepack
48
+ run : npm i -g corepack@latest
49
+ - name : Install pnpm
50
+ run : corepack enable
51
+ - name : Get pnpm store directory
52
+ shell : bash
53
+ run : |
54
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
55
+ - uses : actions/cache@v4
56
+ name : Setup pnpm cache
57
+ with :
58
+ path : ${{ env.STORE_PATH }}
59
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
60
+ restore-keys : |
61
+ ${{ runner.os }}-pnpm-store-
62
+ - name : Install dependencies
63
+ run : pnpm install --frozen-lockfile
64
+ - name : Install playwright dependencies
65
+ run : pnpm exec playwright install
66
+ - name : Run tests
67
+ run : pnpm test
39
68
build :
40
69
runs-on : ubuntu-latest
41
70
steps :
Original file line number Diff line number Diff line change @@ -21,3 +21,4 @@ terraform/**/.t*
21
21
terraform /** /.env
22
22
terraform /** /** /* .tfstate *
23
23
/.cache
24
+ /test-results
Original file line number Diff line number Diff line change 17
17
"icons:optimize" : " node ./src/icons/optimize.js" ,
18
18
"lint" : " prettier --check . && eslint ." ,
19
19
"preview" : " vite preview" ,
20
- "test" : " npm run test:integration && npm run test:unit " ,
20
+ "test" : " npm run test:integration" ,
21
21
"test:integration" : " playwright test" ,
22
22
"test:unit" : " vitest" ,
23
23
"optimize" : " node ./scripts/optimize-assets.js" ,
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ import type { PlaywrightTestConfig } from '@playwright/test';
2
2
3
3
const config : PlaywrightTestConfig = {
4
4
webServer : {
5
- command : 'npm run build && npm run preview ' ,
6
- port : 4173
5
+ command : 'npm run dev ' ,
6
+ port : 5173
7
7
} ,
8
+ fullyParallel : true ,
8
9
testDir : 'tests' ,
9
10
testMatch : / ( .+ \. ) ? ( t e s t | s p e c ) \. [ j t ] s /
10
11
} ;
Original file line number Diff line number Diff line change 139
139
"link" : " /docs/authentication-management" ,
140
140
"redirect" : " /docs/products/auth/users"
141
141
},
142
- {
143
- "link" : " /docs/authentication-server" ,
144
- "redirect" : " /docs/authentication-server"
145
- },
146
142
{
147
143
"link" : " /docs/authentication-security" ,
148
144
"redirect" : " /docs/products/auth/security"
265
261
},
266
262
{
267
263
"link" : " /docs/debugging" ,
268
- "redirect" : " /docs/advanced/self-hosting/debugging "
264
+ "redirect" : " /docs/advanced/self-hosting/debug "
269
265
},
270
266
{
271
267
"link" : " /docs/upgrade" ,
467
463
"link" : " /docs/models/collection" ,
468
464
"redirect" : " /docs/references/cloud/models/collection"
469
465
},
470
- {
471
- "link" : " /docs/models/attribute" ,
472
- "redirect" : " /docs/references/cloud/models/attribute"
473
- },
474
466
{
475
467
"link" : " /docs/models/index" ,
476
468
"redirect" : " /docs/references/cloud/models/index"
659
651
"link" : " /keyboard" ,
660
652
"redirect" : " /docs/tooling/appwriter"
661
653
},
662
- {
663
- "link" : " /careers" ,
664
- "redirect" : " https://appwrite.careers"
665
- },
666
654
{
667
655
"link" : " /policy/terms" ,
668
656
"redirect" : " /terms"
671
659
"link" : " /policy/privacy" ,
672
660
"redirect" : " /privacy"
673
661
},
674
- {
675
- "link" : " /cli/install.sh" ,
676
- "redirect" : " https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/install.sh"
677
- },
662
+
678
663
{
679
664
"link" : " /case-studies" ,
680
665
"redirect" : " /customer-stories"
Original file line number Diff line number Diff line change
1
+ import { redirect } from '@sveltejs/kit' ;
2
+
3
+ export function load ( ) {
4
+ redirect ( 301 , 'https://careers.appwrite.io' ) ;
5
+ }
Original file line number Diff line number Diff line change
1
+ import { redirect } from '@sveltejs/kit' ;
2
+
3
+ export function load ( ) {
4
+ redirect ( 301 , 'https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/install.sh' ) ;
5
+ }
Original file line number Diff line number Diff line change
1
+ import { expect , test } from '@playwright/test' ;
2
+ import redirects from '../src/redirects.json' with { type : 'json' } ;
3
+
4
+ redirects . forEach ( ( { link, redirect } ) => {
5
+ test ( `redirected from ${ link } to ${ redirect } exists` , async ( { page } ) => {
6
+ const response = await page . goto ( redirect ) ;
7
+
8
+ expect ( response ?. ok ( ) ) . toBeTruthy ( ) ;
9
+ } ) ;
10
+ } ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments