generated from this-is-tobi/template-monorepo-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.42 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Lint
on:
workflow_call:
inputs:
BUN_VERSION:
required: false
type: string
workflow_dispatch:
inputs:
BUN_VERSION:
description: Bun version used to run tests
required: true
type: string
default: 1.1.42
jobs:
lint:
name: Lint codebase
runs-on: ubuntu-latest
steps:
- name: Checks-out repository
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "${{ inputs.BUN_VERSION }}"
- name: Get bun store directory
id: bun-store
run: |
echo "STORE_PATH=$(bun pm cache)" >> $GITHUB_OUTPUT
- name: Cache node files
uses: actions/cache@v4
with:
path: |
${{ steps.bun-store.outputs.STORE_PATH }}
key: node-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
node-${{ runner.os }}-${{ runner.arch }}-
- name: Cache turbo files
uses: actions/cache@v4
with:
path: |
./.turbo/cache
key: turbo-lint-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('apps/**/src/**','packages/**/src/**','cypress/src/**') }}
restore-keys: |
turbo-lint-${{ runner.os }}-${{ runner.arch }}-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check lint error
run: |
./ci/scripts/run-tests.sh -l