-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (82 loc) · 2.94 KB
/
Copy pathci.yml
File metadata and controls
103 lines (82 loc) · 2.94 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.bun/install/cache
key: bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: bun-cache-
- name: Install dependencies
run: bun install
- name: Lint (changed files only for PR)
if: github.event_name == 'pull_request'
run: bunx lint-staged --diff="origin/${{ github.base_ref }}...HEAD"
- name: Lint (full for push to main)
if: github.event_name == 'push'
run: bun run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.bun/install/cache
key: bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: bun-cache-
- name: Install dependencies
run: bun install
- name: Typecheck
run: bun run typecheck
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.bun/install/cache
key: bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: bun-cache-
- name: Install dependencies
run: bun install
- name: Run tests
run: bun run test
- name: Generate coverage reports
run: |
cd packages/lsp && bun test --coverage --coverage-reporter=lcov
cd ../code && bun test --coverage --coverage-reporter=lcov || true
cd ../dora && bun test --coverage --coverage-reporter=lcov || true
continue-on-error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: |
./packages/lsp/coverage/lcov.info
./packages/code/coverage/lcov.info
./packages/dora/coverage/lcov.info
fail_ci_if_error: false