-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
fix: refactor the src code & add initial ci tests
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This workflow runs the tests for the application and comments the coverage report to the pull requests that was open. | ||
# It uses the Action described here https://github.com/marketplace/actions/jest-annotations-coverage. | ||
|
||
name: Tests Coverage | ||
on: pull_request | ||
jobs: | ||
coverage: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Respository | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Run Jest Test Coverage | ||
uses: mattallty/jest-github-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
!node_modules | ||
coverage | ||
github_output_test.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
process.env.INPUT_GITHUB_TOKEN = "1234567890abcdef1234567890abcdef12345678" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const crypto = require('crypto'); | ||
|
||
module.exports = { | ||
// see more information here https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables | ||
"GH_REPOSITORY": process.env.GITHUB_REPOSITORY, | ||
// see more information here https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-setting-an-output-parameter | ||
"GITHUB_OUTPUT": process.env.GITHUB_OUTPUT, | ||
// see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings | ||
"EOF": crypto.randomBytes(16).toString("hex") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const crypto = require('crypto'); | ||
|
||
module.exports = { | ||
// set to the GITHUB_REPOSITORY environment variable if it exists by the GH runner, otherwise default to "hiimbex/testing-things" for testing | ||
"GH_REPOSITORY": "hiimbex/testing-things", | ||
// set to GITHUB_OUTPUT with the path from the Actions Runner, otherwise default to "./test/github_output_test.txt" for testing | ||
// see more information here https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-setting-an-output-parameter | ||
"GITHUB_OUTPUT": "./test/github_output_test.txt", | ||
// see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings | ||
"EOF": crypto.randomBytes(16).toString("hex") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
roots: ["<rootDir>/test/"], | ||
setupFiles: ["<rootDir>/.jest/setEnvVars.js"] | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.