From dbfcaf2b14ceac6d236ea6658eaaf275f6eb88cb Mon Sep 17 00:00:00 2001 From: The Jared Wilcurt Date: Sun, 6 Oct 2024 10:59:40 -0400 Subject: [PATCH] GHA --- .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++++++ .github/dependabot.yml | 22 ++++++++++++++++++++++ .github/workflows/node.js.yml | 24 ++++++++++++++++++++++++ vitest.config.js | 8 +++++++- 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/node.js.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..523447f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ + +Related to issue #0 + + +**Notes for reviewer:** + +* + + + +**Checklist:** + +* [ ] Update dependencies +* [ ] Bump diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f2cf352 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +# v4 +version: 2 +updates: + - package-ecosystem: "npm" + target-branch: main + directory: "." + schedule: + interval: "weekly" + versioning-strategy: increase + groups: + npm: + patterns: + - "*" + - package-ecosystem: "github-actions" + target-branch: main + directory: ".github/workflows" + schedule: + interval: "weekly" + groups: + gha: + patterns: + - "*" diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..a764451 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,24 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: volta-cli/action@v4 + - run: node -v + - run: npm -v + - run: npm ci + - run: npm run lint + - run: npm t diff --git a/vitest.config.js b/vitest.config.js index ed6180a..015d894 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -21,7 +21,13 @@ export default defineConfig({ // '.eslintrc.cjs', // '**/app/' ], - reportsDirectory: './tests/unit/coverage' + reportsDirectory: './tests/unit/coverage', + thresholds: { + lines: 100, + functions: 100, + branches: 100, + statements: 100 + } }, environment: 'happy-dom', globals: true,