Skip to content

Commit

Permalink
Merge pull request #5 from hckrnews/feature/v2
Browse files Browse the repository at this point in the history
More tweaks to the actions
  • Loading branch information
w3nl committed Jun 21, 2023
2 parents 20df5d3 + 3ebdb58 commit 7f18c29
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/cpd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node Copy Paste Detector

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: npm cpd
run: |
npm ci
npm run cpd
env:
CI: true
27 changes: 27 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: SonarCloud

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 20
uses: actions/setup-node@v1
with:
node-version: 20
cache: "npm"
- name: npm install, lint, and test
run: |
npm ci
npm run lint:report
npm test
env:
CI: true
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/vulnerabilities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node Vulnerability Check

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: npm vulnerabilities
run: |
npm ci
npm run vulnerabilities
env:
CI: true
6 changes: 5 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"lint:fix": "eslint src/*.js --config .eslintrc --fix",
"test": "c8 node --test src/",
"cpd": "node_modules/jscpd/bin/jscpd src",
"vulnerabilities": "npm audit --only=prod"
"vulnerabilities": "npm audit --omit=dev"
},
"devDependencies": {
"@hckrnews/eslint-config": "^3.0.0",
Expand All @@ -44,7 +44,7 @@
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-sonarjs": "^0.19.0",
"jscpd": "^3.2.1",
"jscpd": "^3.5.9",
"prettier": "^2.2.1",
"supertest": "^6.3.3"
},
Expand All @@ -55,5 +55,9 @@
"dependencies": {
"@hckrnews/arrays": "^3.1.3",
"@hckrnews/enum": "^2.0.1"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/w3nl"
}
}

0 comments on commit 7f18c29

Please sign in to comment.