-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I've still got a bit of work to do before publishing v1.0.0. I need to add tests based on the mbland/tomcat-servlet-testing-example project from whence this came, add more documentation, and refactor. I plan to finish this by 2024-01-05.
- Loading branch information
0 parents
commit ad044d0
Showing
14 changed files
with
3,318 additions
and
0 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,8 @@ | ||
**/vendor/ | ||
build/ | ||
coverage/ | ||
dist/ | ||
jsdoc/ | ||
node_modules/ | ||
out/ | ||
tmp/ |
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 @@ | ||
{ | ||
"env" : { | ||
"node": true, | ||
"es2023" : true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@stylistic/js", | ||
"vitest", | ||
"jsdoc" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:jsdoc/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.test.js"], | ||
"plugins": ["vitest"], | ||
"extends": [ | ||
"plugin:vitest/recommended" | ||
] | ||
} | ||
], | ||
"rules" : { | ||
"@stylistic/js/comma-dangle": [ | ||
"error", "never" | ||
], | ||
"@stylistic/js/indent": [ | ||
"error", 2, { "VariableDeclarator": 2 } | ||
], | ||
"@stylistic/js/keyword-spacing": [ | ||
"error" | ||
], | ||
"@stylistic/js/max-len": [ | ||
"error", 80, 2, { "ignoreUrls": true } | ||
], | ||
"@stylistic/js/quotes": [ | ||
"error", "single" | ||
], | ||
"@stylistic/js/semi": [ | ||
"error", "never" | ||
], | ||
"camelcase": [ | ||
"error", { "properties": "always" } | ||
], | ||
"no-console": [ | ||
"error", { "allow": [ "warn", "error" ]} | ||
] | ||
} | ||
} |
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,5 @@ | ||
# Ensure line endings remain LF on Windows, instead of getting | ||
# translated to CRLF. Otherwise, Bash chokes on \r characters. | ||
# - https://help.github.com/articles/dealing-with-line-endings/ | ||
# - https://stackoverflow.com/a/47187309 | ||
* text eol=lf |
Validating CODEOWNERS rules …
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,4 @@ | ||
# This enables automatic code review requests per: | ||
# - https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
# - https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule | ||
* @mbland |
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,45 @@ | ||
# Per the advice from: | ||
# - https://octopus.com/blog/githubactions-running-unit-tests | ||
# - https://github.com/marketplace/actions/test-reporter | ||
|
||
name: Publish Test Results | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['Run Tests'] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
contents: read | ||
actions: read | ||
checks: write | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# dorny/test-reporter has an `artifact:` attribute that will check out the | ||
# repo and download test results automatically. However, | ||
# dorny/test-reporter@v1 wasn't compatible with the bump to | ||
# actions/upload-artifact@v4 in run-tests.yaml. So we manually check | ||
# out the repo and download the results to avoid the rev lock. | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.workflow_run.head_commit.id }} | ||
|
||
- name: Download test results | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: test-results | ||
github-token: ${{ github.token }} | ||
run-id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Post test report | ||
uses: dorny/test-reporter@v1 | ||
with: | ||
name: Test Results | ||
path: 'TESTS-TestSuites.xml' | ||
reporter: java-junit | ||
fail-on-error: 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Run Tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths-ignore: [ "**.md", "**.txt" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
paths-ignore: [ "**.md", "**.txt" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-test: | ||
name: "Run Tests" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
cache-dependency-path: 'pnpm-lock.yaml' | ||
|
||
- name: Install dependencies | ||
run: "pnpm install" | ||
|
||
- name: Build and test | ||
run: "pnpm test:ci" | ||
|
||
# Per the advice from: | ||
# - https://github.com/marketplace/actions/test-reporter | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: test-results | ||
path: 'TESTS-TestSuites.xml' | ||
|
||
- name: Send test coverage to Coveralls.io | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
file: 'coverage/lcov.info' |
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,13 @@ | ||
.DS_Store | ||
.idea/ | ||
.vscode/ | ||
TESTS-*.xml | ||
build/ | ||
coverage/ | ||
dist/ | ||
jsdoc/ | ||
node_modules/ | ||
out/ | ||
pnpm-debug.log | ||
tmp/ | ||
*.log |
Oops, something went wrong.