Skip to content

Commit

Permalink
Migrage to vitest (#25)
Browse files Browse the repository at this point in the history
* Migrate to vitest

* Update devDependencies

* Update github actions

* Fix tsc errors

* Add unit test coverage

* Add coverage reporter

* use test-ci in actions

* vitest config

* Specifying node version

mend

mend

* Updating nodejs package action

---------

Co-authored-by: Brian Ball <brian.ball@perficient.com>
  • Loading branch information
cbrianball and Brian Ball authored Dec 27, 2023
1 parent 6869403 commit 8dc827f
Show file tree
Hide file tree
Showing 16 changed files with 4,126 additions and 2,842 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/action-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '12.x'
node-version: 'lts/Hydrogen'
- run: npm ci
- run: npm test
- run: npm run test-ci
- name: Report Coverage
uses: davelosert/vitest-coverage-report-action@v2
if: always()
- run: npm run build --if-present
9 changes: 6 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 'lts/Hydrogen'
- run: npm ci
- run: npm test
- run: npm test-ci
- name: report coverage
uses: davelosert/vitest-coverage-report-action@v2
if: always()

publish-npm:
needs: build
Expand All @@ -25,7 +28,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 'lts/Hydrogen'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm version "${GITHUB_REF#refs/tags/}" --no-git-tag-version
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
Loading

0 comments on commit 8dc827f

Please sign in to comment.