From 1aa932b426400c51f0dce8cefb7613ca309d2c6f Mon Sep 17 00:00:00 2001 From: Andrea Carraro Date: Tue, 18 Jun 2024 12:31:18 +0200 Subject: [PATCH] chore: replace renovate with dependabot (#245) --- .github/dependabot.yml | 31 +++++++++++++++++++ .github/workflows/ci.yml | 27 +++++++++++++--- .github/workflows/dependabot-auto-merge.yml | 15 +++++++++ renovate.json | 34 --------------------- 4 files changed, 68 insertions(+), 39 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-auto-merge.yml delete mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..f8ae222f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,31 @@ +version: 2 +updates: + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'weekly' + groups: + jest: + patterns: + - 'jest' + - 'babel-jest' + - 'ts-jest' + - '@types/jest' + rollup: + patterns: + - 'rollup' + - 'rollup-*' + - '@rollup/*' + babel: + patterns: + - '@babel/*' + + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'daily' + groups: + upload-download-artifact: + patterns: + - 'actions/upload-artifact' + - 'actions/download-artifact' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe7a4705..a58726a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,20 +7,37 @@ on: pull_request: jobs: - build: + test-and-build: + name: 'Test and build' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js v20 - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - run: npm ci - - name: Upload code coverage - uses: coverallsapp/github-action@master + - uses: actions/upload-artifact@v4 + with: + name: code-coverage + path: coverage + + upload-code-coverage: + name: 'Upload code coverage' + needs: ['test-and-build'] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + name: code-coverage + path: coverage + + - uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..ec943531 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,15 @@ +name: Dependabot auto merge + +on: + pull_request: + +jobs: + dependabot-auto-merge: + name: 'Dependabot auto merge' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ahmadnassri/action-dependabot-auto-merge@v2 + with: + target: minor + github-token: ${{ secrets.READ_AND_WRITE_TOKEN }} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index b674a416..00000000 --- a/renovate.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": ["config:base"], - "schedule": "every month", - "postUpdateOptions": ["npmDedupe"], - "masterIssue": true, - "packageRules": [ - { - "packagePatterns": ["^rollup"], - "groupName": "Update rollup packages" - }, - { - "packagePatterns": ["^@babel/"], - "groupName": "Update babel packages" - }, - { - "packageNames": ["jest", "@types/jest", "babel-jest", "ts-jest"], - "groupName": "Update jest packages" - }, - { - "depTypeList": ["peerDependencies"], - "rangeStrategy": "widen" - }, - { - "depTypeList": ["devDependencies"], - "rangeStrategy": "bump", - "automerge": true, - "automergeType": "branch", - "stabilityDays": 3, - "major": { - "automerge": false - } - } - ] -}