- Create a Hobby account on Vercel using Github login (https://vercel.com/signup)
- Go to SvelteKit docs and go through Getting Started (https://kit.svelte.dev/docs/creating-a-project)
- npm create svelte@latest my-svelte-app
- cd my-svelte-app
- code .
- npm install
- npm run dev
- Install recommended extension in VSCode (Svelte, Vitest, Playwright)
- Create Github Repo
- Add code to git repo
- git init
- Commit code as "Initial Setup"
- Follow commands from github
- Setup git action for playwright
- npm init playwright@latest
- set folder to "tests" to match Sveltekit
- Create PR and see tests run
- Setup Vitest Github Action
- Copy Playwright and make similar workflow
name: Vitest Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Execute Unit tests
run: "npm run test:unit"
- Get some data from API https://www.energidataservice.dk/tso-electricity/Elspotprices
- Install npm install @picocss/pico
- Copy paste code from other project