Skip to content

Commit dc240cf

Browse files
committed
chore(CI): Move linting into its own step
1 parent 6486ea7 commit dc240cf

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

.github/workflows/tests.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,42 @@ jobs:
6565
- name: Run Build
6666
run: pnpm build
6767

68-
- name: Run Lint
69-
run: pnpm lint
70-
7168
- name: Run Tests
7269
run: pnpm test
7370

71+
lint:
72+
runs-on: buildjet-4vcpu-ubuntu-2204
73+
container:
74+
image: node:18
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v3
78+
79+
- name: Enable Corepack
80+
id: pnpm-setup
81+
run: |
82+
corepack enable
83+
corepack prepare pnpm@latest --activate
84+
pnpm config set script-shell "/usr/bin/bash"
85+
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
86+
87+
- name: pnpm Cache
88+
uses: buildjet/cache@v3
89+
with:
90+
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }}
91+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
92+
restore-keys: |
93+
${{ runner.os }}-pnpm-store-
94+
95+
- name: Install packages
96+
run: pnpm install --frozen-lockfile
97+
98+
- name: Run Build
99+
run: pnpm build
100+
101+
- name: Run Lint
102+
run: pnpm lint
103+
74104
build:
75105
runs-on: buildjet-4vcpu-ubuntu-2204
76106
container:

0 commit comments

Comments
 (0)