Skip to content

Commit

Permalink
Add vitest (#123)
Browse files Browse the repository at this point in the history
Add vitest example test and add GitHub action to run it.

Relatedly, add `.prettierrc` and a GitHub Action to check TypeScript
types.
  • Loading branch information
jawj authored Dec 10, 2024
1 parent 1fecf05 commit da779b2
Show file tree
Hide file tree
Showing 10 changed files with 4,099 additions and 11,530 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/check-format.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
# setup
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install package dependencies
run: bun install

# goal
- name: Check TypeScript types
run: bun run check

- name: Check code formatting
run: bun run format
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
# setup
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install package dependencies
run: bun install

# goal
- name: Run tests
run: bun run test
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
Loading

0 comments on commit da779b2

Please sign in to comment.