Skip to content

Commit 8af0690

Browse files
Added vitest & moved some func to top-level
Also added a first-draft test and a new github action to figure out how it all works.
1 parent ee36441 commit 8af0690

File tree

12 files changed

+570
-178
lines changed

12 files changed

+570
-178
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ['main']
7+
branches: ["main"]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -17,7 +17,7 @@ permissions:
1717

1818
# Allow one concurrent deployment
1919
concurrency:
20-
group: 'pages'
20+
group: "pages"
2121
cancel-in-progress: true
2222

2323
jobs:
@@ -29,12 +29,12 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3333
- name: Set up Node
3434
uses: actions/setup-node@v6
3535
with:
3636
node-version: lts/*
37-
cache: 'npm'
37+
cache: "npm"
3838
- name: Install dependencies
3939
run: npm ci
4040
- name: Build
@@ -45,7 +45,7 @@ jobs:
4545
uses: actions/upload-pages-artifact@v4
4646
with:
4747
# Upload dist folder
48-
path: './dist'
48+
path: "./dist"
4949
- name: Deploy to GitHub Pages
5050
id: deployment
5151
uses: actions/deploy-pages@v4

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run tests
2+
3+
# Remove default permissions of GITHUB_TOKEN for security
4+
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
5+
permissions: {}
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
25+
- name: Set up Node
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: lts/*
29+
cache: "npm"
30+
- run: npm ci
31+
32+
- name: Run tests
33+
run: npm run test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ yarn-error.log*
77
pnpm-debug.log*
88
lerna-debug.log*
99

10+
# Dependencies
1011
node_modules
12+
13+
# Build artifacts
1114
dist
1215
dist-ssr
1316
*.local
17+
*.tsbuildinfo
1418

1519
# Editor directories and files
1620
.vscode/*

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default defineConfig([
1616
reactRefresh.configs.vite,
1717
],
1818
languageOptions: {
19-
ecmaVersion: 2020,
19+
ecmaVersion: 'latest',
2020
globals: globals.browser,
2121
parserOptions: {
2222
ecmaVersion: 'latest',

0 commit comments

Comments
 (0)