@@ -55,22 +55,12 @@ jobs:
5555 if : steps.lerna-cache.outputs.cache-hit != 'true' || contains( github.event.pull_request.labels.*.name, 'SKIP_CACHE')
5656 run : yarn install --with-frozen-lockfile --ignore-scripts
5757
58- - name : Lint Commit Messages
59- run : |
60- GITHUB_REPO_BRANCH=$GITHUB_BASE_REF yarn run check-commits
61-
6258 - name : Check In-Repo Package Versions
6359 run : yarn run check-versions
6460
6561 - name : Dependency Audit
6662 run : yarn run improved-yarn-audit --min-severity high
6763
68- - name : Lint Source Code
69- run : yarn run lint
70-
71- - name : Check Source Code Formatting
72- run : yarn run check-fmt
73-
7464 - name : build packages
7565 env :
7666 # Workaround for https://github.com/nodejs/node/issues/51555
9383 # CODECOV_FLAG: unit
9484 # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9585
86+ code-quality :
87+ runs-on : ubuntu-latest
88+ strategy :
89+ fail-fast : false
90+ matrix :
91+ check : ['lint', 'format', 'commit-lint']
92+
93+ steps :
94+ - uses : actions/checkout@v4
95+ with :
96+ ref : ${{ github.event.pull_request.head.sha }}
97+
98+ - name : Setup node 18
99+ uses : actions/setup-node@v3
100+ with :
101+ node-version : 18
102+
103+ - name : restore lerna dependencies
104+ id : lerna-cache
105+ uses : actions/cache@v3
106+ with :
107+ path : |
108+ node_modules
109+ modules/*/node_modules
110+ key : ${{ runner.os }}-node18-${{ hashFiles('yarn.lock') }}-${{ hashFiles('tsconfig.packages.json') }}-${{ hashFiles('package.json') }}
111+
112+ - name : Install Packages
113+ if : steps.lerna-cache.outputs.cache-hit != 'true' || contains( github.event.pull_request.labels.*.name, 'SKIP_CACHE')
114+ run : yarn install --with-frozen-lockfile --ignore-scripts
115+
116+ - name : Lint Source Code
117+ if : matrix.check == 'lint'
118+ run : yarn run lint
119+
120+ - name : Check Source Code Formatting
121+ if : matrix.check == 'format'
122+ run : yarn run check-fmt
123+
124+ - name : Lint Commit Messages
125+ if : matrix.check == 'commit-lint'
126+ run : |
127+ git fetch --unshallow origin $GITHUB_BASE_REF
128+ GITHUB_REPO_BRANCH=$GITHUB_BASE_REF yarn run check-commits
129+
96130 browser-test :
97131 runs-on : ubuntu-22.04
98132
0 commit comments