Skip to content

Commit e9d833e

Browse files
authored
Merge pull request #18 from hckrnews/feature/coverage-sonarcloud
Github action finetuning
2 parents 088293e + fe8f7ce commit e9d833e

9 files changed

+1702
-29
lines changed

.github/workflows/cpd.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Node Copy Paste Detector
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Use Node.js 18
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
cache: 'npm'
17+
- name: npm lint
18+
run: |
19+
npm ci
20+
npm run cpd
21+
env:
22+
CI: true

.github/workflows/lint.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ jobs:
77

88
runs-on: ubuntu-latest
99

10-
strategy:
11-
matrix:
12-
node-version: [18.x]
13-
1410
steps:
1511
- uses: actions/checkout@v3
16-
- name: Use Node.js ${{ matrix.node-version }}
12+
- name: Use Node.js 18
1713
uses: actions/setup-node@v3
1814
with:
19-
node-version: ${{ matrix.node-version }}
15+
node-version: 18
16+
cache: 'npm'
2017
- name: npm lint
2118
run: |
2219
npm ci

.github/workflows/sonarcloud.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ jobs:
77

88
runs-on: ubuntu-latest
99

10-
strategy:
11-
matrix:
12-
node-version: [18.x]
13-
1410
steps:
1511
- uses: actions/checkout@v2
16-
- name: Use Node.js ${{ matrix.node-version }}
12+
- name: Use Node.js 18
1713
uses: actions/setup-node@v1
1814
with:
19-
node-version: ${{ matrix.node-version }}
15+
node-version: 18
16+
cache: 'npm'
2017
- name: npm install, lint, and test
2118
run: |
2219
npm ci

.github/workflows/vulnerabilities.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Node Vulnerability Check
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Use Node.js 18
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
cache: 'npm'
17+
- name: npm lint
18+
run: |
19+
npm ci
20+
npm run vulnerabilities
21+
env:
22+
CI: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,4 @@ dist
106106
.dccache
107107
.DS_STORE
108108
report.json
109+
report/

.jscpd.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"threshold": 0,
3+
"reporters": [
4+
"json",
5+
"console"
6+
],
7+
"ignore": [
8+
"**/__snapshots__/**",
9+
"**/__tests__/**",
10+
"**/__fixtures__/**"
11+
],
12+
"absolute": true,
13+
"gitignore": true
14+
}

example/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Arr } from '../src/helpers';
1+
import { Arr } from '../src/helpers.js';
22

33
const exampleArray = new Arr([1, 2, 3]);
44
const { average } = exampleArray;

0 commit comments

Comments
 (0)