Repository navigation
107 lines (87 loc) · 2.78 KB
/
Copy pathpull-request.yml
File metadata and controls
107 lines (87 loc) · 2.78 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
104
105
106
107
name: Pull Request
on:
pull_request:
env:
# Turborepo's `--affected` flag diffs against this ref to determine which
# workspaces changed relative to the PR's base branch. `fetch-depth: 0` on
# the checkout below is what makes `origin/<base_ref>` resolvable here.
TURBO_SCM_BASE: origin/${{ github.base_ref }}
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up workspace
uses: ./.github/actions/setup
- name: Check formatting of affected workspaces
run: pnpm exec turbo run format --affected
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up workspace
uses: ./.github/actions/setup
- name: Lint affected workspaces
run: pnpm exec turbo run lint --affected
type-check:
name: Type-check
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up workspace
uses: ./.github/actions/setup
- name: Type-check affected workspaces
run: pnpm exec turbo run type-check --affected
knip:
name: Unused code (knip)
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up workspace
uses: ./.github/actions/setup
- name: Report unused code
run: pnpm exec turbo run knip --affected
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up workspace
uses: ./.github/actions/setup
- name: Run tests for affected workspaces
run: pnpm exec turbo run test --affected
package-extension:
name: Package VS Code extension
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up workspace
uses: ./.github/actions/setup
# Not affected-filtered: this job is the only automated proof the
# .vsix bundle actually assembles, so it always runs regardless of
# which workspaces changed. `turbo run package` (rather than a plain
# `pnpm --filter vscode package`) is used deliberately so the task's
# `build` dependency runs first — the extension can't be packaged
# without a build, and turbo's dependency graph guarantees the order.
- name: Build the .vsix package
run: pnpm exec turbo run package --filter=vscode