Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/code-pushup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Code PushUp

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read
actions: read
pull-requests: write

jobs:
code-pushup:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: npm
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Code PushUp
uses: code-pushup/github-action@v0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ output*/
ref*/
dist/
tsconfig.tsbuildinfo
.code-pushup
69 changes: 69 additions & 0 deletions code-pushup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import coveragePlugin from '@code-pushup/coverage-plugin';
import eslintPlugin from '@code-pushup/eslint-plugin';
import jsPackagesPlugin from '@code-pushup/js-packages-plugin';
import type { CoreConfig } from '@code-pushup/models';

const config: CoreConfig = {
plugins: [
await eslintPlugin({
eslintrc: {
extends: [
'@code-pushup/eslint-config/typescript',
'@code-pushup/eslint-config/jest',
],
parserOptions: {
project: 'tsconfig.json',
},
},
patterns: 'src/**/*.ts',
}),
await coveragePlugin({
coverageToolCommand: { command: 'npx', args: ['jest', '--coverage'] },
reports: ['coverage/lcov.info'],
}),
await jsPackagesPlugin({ packageManager: 'npm' }),
],

categories: [
{
slug: 'bug-prevention',
title: 'Bug prevention',
refs: [{ type: 'group', plugin: 'eslint', slug: 'problems', weight: 1 }],
},
{
slug: 'code-style',
title: 'Code style',
refs: [
{ type: 'group', plugin: 'eslint', slug: 'suggestions', weight: 1 },
],
},
{
slug: 'code-coverage',
title: 'Code coverage',
refs: [
{ type: 'group', plugin: 'coverage', slug: 'coverage', weight: 1 },
],
},
{
slug: 'security',
title: 'Security',
refs: [
{ type: 'group', plugin: 'js-packages', slug: 'npm-audit', weight: 1 },
],
},
{
slug: 'updates',
title: 'Updates',
refs: [
{
type: 'group',
plugin: 'js-packages',
slug: 'npm-outdated',
weight: 1,
},
],
},
],
};

export default config;
Loading