Skip to content

Commit ca9a529

Browse files
authored
Merge pull request #26 from kinde-oss/ci/add-pr-workflow
ci: add PR workflow, remove unused workflow
2 parents b50167c + 99de1d1 commit ca9a529

18 files changed

+3255
-133
lines changed

.env_example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ KINDE_REDIRECT_URL=http://localhost:4173/api/auth/kinde_callback
88
KINDE_SCOPE=profile email offline openid
99
KINDE_USER_EMAIL_TEST= // An user has existed in your organization
1010
KINDE_USER_PASSWORD_TEST=
11-
KINDE_AUTH_WITH_PKCE=
11+
KINDE_AUTH_WITH_PKCE=
12+
KINDE_DEBUG=false

.github/workflows/build-test-ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them,
2+
# build the source code and run tests. It was created by using the following workflow
3+
# as a template.
4+
#
5+
# https://pnpm.io/next/continuous-integration#github-actions
6+
7+
name: Build and test
8+
9+
on:
10+
push:
11+
branches: [main]
12+
pull_request:
13+
branches: [main]
14+
15+
jobs:
16+
main:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node-version: [18.x]
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: pnpm/action-setup@v2
24+
with:
25+
version: 8
26+
- name: Setting up Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'pnpm'
31+
- name: Enabling pre-post scripts
32+
run: pnpm config set enable-pre-post-scripts true
33+
- run: pnpm install
34+
- name: Cache pnpm modules
35+
uses: actions/cache@v2
36+
with:
37+
path: ~/.pnpm-store
38+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pnpm-
41+
- run: pnpm build
42+
- run: pnpm test

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
"preview": "vite preview",
99
"package": "svelte-kit sync && svelte-package && publint",
1010
"prepublishOnly": "npm run package",
11-
"test": "vite build && npm run test:integration",
1211
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1312
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1413
"lint": "prettier --plugin-search-dir . --check . && eslint .",
1514
"format": "prettier --plugin-search-dir . --write .",
16-
"test:integration": "playwright test",
17-
"test:unit": "vitest"
15+
"test": "vitest"
1816
},
1917
"author": {
2018
"name": "Kinde",
@@ -47,13 +45,12 @@
4745
"@kinde-oss/kinde-typescript-sdk": "^2.7.2"
4846
},
4947
"devDependencies": {
50-
"@playwright/test": "^1.28.1",
5148
"@sveltejs/adapter-auto": "^2.0.0",
5249
"@sveltejs/kit": "^1.20.4",
5350
"@sveltejs/package": "^2.0.0",
5451
"@typescript-eslint/eslint-plugin": "^5.45.0",
5552
"@typescript-eslint/parser": "^5.45.0",
56-
"dotenv": "^16.3.1",
53+
"@vitest/coverage-v8": "^1.3.1",
5754
"eslint": "^8.28.0",
5855
"eslint-config-prettier": "^8.5.0",
5956
"eslint-plugin-svelte": "^2.30.0",
@@ -64,8 +61,8 @@
6461
"svelte-check": "^3.4.3",
6562
"tslib": "^2.4.1",
6663
"typescript": "^5.0.0",
67-
"vite": "^4.4.2",
68-
"vitest": "^0.32.2"
64+
"vite": "^5.1.6",
65+
"vitest": "^1.3.1"
6966
},
7067
"svelte": "./dist/index.js",
7168
"types": "./dist/index.d.ts",

playwright.config.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)