Skip to content

Commit

Permalink
tests: initial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdevv committed Sep 17, 2024
1 parent 1067084 commit 84da055
Show file tree
Hide file tree
Showing 24 changed files with 705 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8.10.2
version: 8.15.9

- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on:
push:
branches:
- main

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8.15.9

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Tests
run: pnpm test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"extractinator": "DEBUG=1 vite-node src/exports/cli.ts --",
"extractinator:watch": "DEBUG=1 vite-node --watch src/exports/cli.ts --",
"playground": "pnpm run extractinator extract playground playground/out",
"playground2": "pnpm run extractinator:watch extract playground2/in playground2/out --log-level=verbose",
"build": "tsup-node && publint",
"build:watch": "tsup-node --watch",
"test": "vitest"
Expand All @@ -36,7 +35,8 @@
"publint": "^0.2.7",
"tsup": "^8.0.1",
"vite": "^5.0.10",
"vite-node": "^1.1.0"
"vite-node": "^1.1.0",
"vitest": "^2.1.1"
},
"homepage": "https://github.com/ghostdevv/extractinator",
"repository": {
Expand Down
Loading

0 comments on commit 84da055

Please sign in to comment.