-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from PysioHub/main
更新版本 fix: #222
- Loading branch information
Showing
12 changed files
with
10,718 additions
and
6,183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Coveralls Tests | ||
on: [push, pull_request] | ||
env: | ||
CI: true | ||
|
||
jobs: | ||
test: | ||
name: Node ${{ matrix.node }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [18, 20, 21] | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install npm dependencies | ||
run: npm install | ||
|
||
- name: Run Build | ||
run: npm run docs:build | ||
|
||
- name: Run tests with coverage | ||
run: npm run coverage | ||
|
||
# - name: Upload coverage to Coveralls | ||
# uses: coverallsapp/github-action@v2 | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# path-to-lcov: ./coverage/lcov.info | ||
# flag-name: ${{ matrix.os }}-node-${{ matrix.node }} | ||
# parallel: true | ||
|
||
# finish: | ||
# needs: test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Clone repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Coveralls Finished | ||
# uses: coverallsapp/github-action@v2 | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# parallel-finished: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules/ | |
src/.vuepress/.cache/ | ||
src/.vuepress/.temp/ | ||
src/.vuepress/dist/ | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/preset-env', | ||
'@babel/preset-typescript', | ||
], | ||
sourceMaps: 'inline', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** @type {import('jest').Config} */ | ||
const config = { | ||
collectCoverage: true, | ||
coverageDirectory: "coverage", | ||
coverageProvider: "v8", | ||
testEnvironment: "node", | ||
transform: { | ||
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { | ||
sourceMaps: false, | ||
plugins: ['@babel/plugin-transform-modules-commonjs'] | ||
}] | ||
}, | ||
moduleFileExtensions: ["js", "jsx", "ts", "tsx", "json", "node"], | ||
testMatch: [ | ||
"**/__tests__/**/*.[jt]s?(x)", | ||
"**/?(*.)+(spec|test).[tj]s?(x)" | ||
], | ||
collectCoverageFrom: [ | ||
"src/**/*.{js,jsx,ts,tsx}", | ||
"!src/**/*.d.ts", | ||
"!src/.vuepress/**/*", | ||
"!**/node_modules/**" | ||
], | ||
moduleNameMapper: { | ||
"^@/(.*)$": "<rootDir>/src/$1" | ||
} | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.