From e886d7cb0553873c0cc60364d7306307fa2034d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Fri, 31 Oct 2025 10:02:19 +0000 Subject: [PATCH] chore: add dependabot configuration and CI workflow for tests --- .github/dependabot.yml | 10 ++++++++ .github/workflows/test.yml | 52 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..44746b9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/.github/workflows" + schedule: + interval: "weekly" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..645934d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,52 @@ +name: CI-Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20, 22, 24, latest] + steps: + - uses: actions/checkout@v5 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node-version }} + - run: npm install prom-client + - run: npm install + - run: npm run lint + - run: npm test + - run: npm run test-types + + codeql: + name: CodeQL Analysis + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: javascript + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + + audit: + name: Audit Dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Use Node.js 18 + uses: actions/setup-node@v6 + with: + node-version: 18 + - run: npm install + - name: Audit Dependencies + run: npm audit --audit-level=moderate \ No newline at end of file