Skip to content

Commit b57eb6b

Browse files
committed
Add linting as a build step in CI
1 parent fabe7ae commit b57eb6b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
DEVEL_COVER_OPTIONS: '-ignore,^local/'
3939
steps:
4040
- uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
43+
if: matrix.resolver == 'snapshot'
44+
- uses: actions/checkout@v4
45+
if: matrix.resolver != 'snapshot'
4146
- uses: actions/setup-node@v4
4247
with:
4348
node-version: '18'
@@ -83,3 +88,14 @@ jobs:
8388
run: cover -report codecov
8489
env:
8590
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
91+
- name: Install precious
92+
run: ./bin/install-precious /usr/local/bin
93+
- name: Fetch master
94+
run: git fetch origin master:master
95+
if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot'
96+
- name: Lint files in diff
97+
run: precious lint -d master
98+
if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot'
99+
- name: Lint all files
100+
run: precious lint --all
101+
if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot'

0 commit comments

Comments
 (0)