Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,29 @@ jobs:
- name: Check out repo
uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Set up node
uses: actions/setup-node@v3
with:
cache: yarn
cache: pnpm

- name: Install dependencies
run: |
yarn
npx playwright install
pnpm install
npx playwright install chromium

- name: Run tests
id: tests
run: yarn test
run: pnpm test

- name: Build package and publish to NPM
if: github.event_name == 'release' && steps.tests.outcome == 'success' && runner.os == 'Linux'
run: |
yarn package
yarn publish package
pnpm package
pnpm publish package
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ default_stages: [commit]

default_install_hook_types: [pre-commit, commit-msg]

exclude: ^pnpm-lock.yaml$

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
Expand Down Expand Up @@ -33,7 +35,6 @@ repos:
hooks:
- id: codespell
stages: [commit, commit-msg]
exclude: yarn.lock

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.24.0
Expand Down
3 changes: 1 addition & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[build]
command = "yarn build"
command = "pnpm build"
publish = "build"

[build.environment]
NODE_VERSION = "18.6.0"
YARN_VERSION = "1.22.19"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build": "vite build",
"preview": "vite preview",
"package": "svelte-package",
"serve": "yarn build && yarn preview",
"serve": "pnpm build && pnpm preview",
"check": "svelte-check --ignore package",
"test": "vitest --run tests/unit/*.ts && playwright test tests/*.test.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { PlaywrightTestConfig } from '@playwright/test'

const config: PlaywrightTestConfig = {
webServer: {
command: `yarn dev --port 3005`,
command: `pnpm dev --port 3005`,
port: 3005,
},
}
Expand Down
Loading