Skip to content

Commit

Permalink
Add the first test for the github scanner.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyasskin committed Jan 18, 2024
1 parent 4ed63db commit e8e4c21
Show file tree
Hide file tree
Showing 5 changed files with 310 additions and 28 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
- push
- pull_request

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20"
cache: pnpm
- uses: pnpm/action-setup@v2
with:
run_install: true
- name: Run tests
run: pnpm test
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"build": "astro --root frontend build",
"preview": "astro --root frontend preview",
"astro": "astro --root frontend",
"scan": "tsc && node build/scanner/main.js --out-dir frontend/src/content/github"
"scan": "tsc && node build/scanner/main.js --out-dir frontend/src/content/github",
"test": "tsc && mocha build"
},
"mocha": {
"spec": "build/**/*.test.js"
},
"keywords": [],
"author": "",
Expand All @@ -34,8 +38,10 @@
"devDependencies": {
"@astrojs/check": "^0.3.4",
"@tsconfig/node20": "^20.1.2",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.6",
"mocha": "^10.2.0",
"typescript": "^5.3.3"
},
"packageManager": "pnpm@8.14.0+sha256.9cebf61abd83f68177b29484da72da9751390eaad46dfc3072d266bfbb1ba7bf"
"packageManager": "pnpm@8.14.1+sha256.2df78e65d433d7693b9d3fbdaf431b2d96bb4f96a2ffecd51a50efe16e50a6a8"
}
Loading

0 comments on commit e8e4c21

Please sign in to comment.