@@ -23,7 +23,40 @@ concurrency:
2323 cancel-in-progress : true
2424
2525jobs :
26- dupe-check :
26+ lint-commits :
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@v4
30+ with :
31+ fetch-depth : 20
32+ - uses : actions/setup-node@v4
33+ with :
34+ node-version : ' 20'
35+ - name : Check PR title
36+ run : |
37+ node "$GITHUB_WORKSPACE/.github/workflows/lintcommit.js"
38+
39+ lint :
40+ needs : lint-commits
41+ runs-on : ubuntu-latest
42+ strategy :
43+ matrix :
44+ node-version : [18.x]
45+ vscode-version : [stable]
46+ env :
47+ NODE_OPTIONS : ' --max-old-space-size=8192'
48+ steps :
49+ - uses : actions/checkout@v4
50+ - name : Use Node.js ${{ matrix.node-version }}
51+ uses : actions/setup-node@v4
52+ with :
53+ node-version : ${{ matrix.node-version }}
54+ - run : npm ci
55+ - run : npm run testCompile
56+ - run : npm run lint
57+
58+ jscpd :
59+ needs : lint
2760 runs-on : ubuntu-latest
2861 strategy :
2962 matrix :
@@ -79,15 +112,15 @@ jobs:
79112 ' ./jscpd-report.json > filtered-jscpd-report.json
80113 cat filtered-jscpd-report.json
81114
82- - name : Check if filtered jscpd report exists
115+ - name : Check for duplicates
83116 run : |
84117 if [ $(wc -l < ./filtered-jscpd-report.json) -gt 1 ]; then
85118 echo "filtered_report_exists=true" >> $GITHUB_ENV
86119 else
87120 echo "filtered_report_exists=false" >> $GITHUB_ENV
88121 fi
89-
90- - if : env.filtered_report_exists == 'true'
122+ - name : upload filtered report (if applicable)
123+ if : env.filtered_report_exists == 'true'
91124 uses : actions/upload-artifact@v4
92125 with :
93126 name : filtered-jscpd-report
@@ -100,38 +133,6 @@ jobs:
100133 echo "Duplications found, failing the check."
101134 exit 1
102135
103- lint-commits :
104- runs-on : ubuntu-latest
105- steps :
106- - uses : actions/checkout@v4
107- with :
108- fetch-depth : 20
109- - uses : actions/setup-node@v4
110- with :
111- node-version : ' 20'
112- - name : Check PR title
113- run : |
114- node "$GITHUB_WORKSPACE/.github/workflows/lintcommit.js"
115-
116- lint :
117- needs : lint-commits
118- runs-on : ubuntu-latest
119- strategy :
120- matrix :
121- node-version : [18.x]
122- vscode-version : [stable]
123- env :
124- NODE_OPTIONS : ' --max-old-space-size=8192'
125- steps :
126- - uses : actions/checkout@v4
127- - name : Use Node.js ${{ matrix.node-version }}
128- uses : actions/setup-node@v4
129- with :
130- node-version : ${{ matrix.node-version }}
131- - run : npm ci
132- - run : npm run testCompile
133- - run : npm run lint
134-
135136 macos :
136137 needs : lint-commits
137138 name : test macOS
0 commit comments