Skip to content

Commit

Permalink
chore: Add dependabot configuration and update CI workflow (#12)
Browse files Browse the repository at this point in the history
* chore: add dependabot configuration and update CI workflow

* chore: remove unused test and eject scripts from package.json
  • Loading branch information
born3am committed Dec 15, 2024
1 parent c6cfe5c commit 4d85c9a
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 31 deletions.
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
open-pull-requests-limit: 5
schedule:
interval: 'monthly'
day: 'first-tuesday'
time: '10:00'
timezone: 'Europe/Berlin'
assignees: ['born3am'] # Assign PRs to a specific user or team
commit-message:
prefix: 'chore' # PR title prefix
include: 'scope'
groups:
minor-updates:
applies-to: version-updates
update-types:
- 'patch' # Group all patch updates together
versioning-strategy: increase-if-necessary
ignore:
- dependency-name: '*'
versions:
- 'alpha'
- 'beta'
- 'canary'
- 'dev'
- 'experimental'
- 'legacy'
- 'next'
- 'nightly'
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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', 'master']
pull_request:
branches: ['main', 'master']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
fail-fast: true

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Check prettier compliance
run: npm run prettier --if-present

- name: Check stylelint compliance
run: npm run stylelint --if-present

- name: Check lint compliance
run: npm run lint --if-present

- name: Build
run: npm run build --if-present

- name: TypeScript Type Check
run: npm run type-check --if-present

- name: Run unit tests
run: npm test --if-present
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"scripts": {
"start": "vite",
"build": "vite build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint -c eslint.config.js --cache .",
"lint:fix": "npm run lint -- --no-cache --fix",
"prettier": "prettier --check --cache --no-error-on-unmatched-pattern '**/*.md' '**/*.yml' '**/*.json' '**/*.html' '**/*.css' '**/*.scss' '**/*.sass' '**/*.less'",
Expand Down

0 comments on commit 4d85c9a

Please sign in to comment.