-
Notifications
You must be signed in to change notification settings - Fork 1
177 lines (144 loc) · 4.78 KB
/
ci.yml
File metadata and controls
177 lines (144 loc) · 4.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
hook-tests:
name: hook tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: install pytest
run: pip install pytest
- name: install jq (linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y jq
- name: install jq (macos)
if: matrix.os == 'macos-latest'
run: brew install jq
- name: run hook tests
run: bash hooks/tests/run.sh
harness-tests:
name: harness + proxy smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: run harness + proxy smoke tests
run: node --test bin/tool-harness.test.js bin/tool-server-proxy.test.js
fixture-probe:
name: fixture probe (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: install language servers
run: |
npm i -g pyright typescript-language-server typescript
- name: install formatter tools (opt-in wrappers)
run: |
npm i -g prettier eslint
- name: install jq (linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y jq
- name: install jq (macos)
if: matrix.os == 'macos-latest'
run: brew install jq
- name: install jdtls (macos)
if: matrix.os == 'macos-latest'
run: brew install jdtls
- name: probe fixtures + diff baselines (strict — shape + sha + outline)
env:
VERIFY_STRICT_SHA: '1'
run: bash scripts/verify.sh --diff-baselines
opt-in-probe:
name: opt-in wrapper smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: install jq (linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y jq
- name: install jq (macos)
if: matrix.os == 'macos-latest'
run: brew install jq
- name: install prettier + eslint
run: npm i -g prettier eslint
- name: install dotnet (macos)
if: matrix.os == 'macos-latest'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: install dotnet (linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: install sbt (macos)
if: matrix.os == 'macos-latest'
run: brew install sbt
- name: install sbt (linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo mkdir -p /etc/apt/keyrings
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" \
| sudo gpg --dearmor -o /etc/apt/keyrings/sbt.gpg
echo "deb [signed-by=/etc/apt/keyrings/sbt.gpg] https://repo.scala-sbt.org/scalasbt/debian all main" \
| sudo tee /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install -y sbt
- name: smoke prettier-direct
run: |
bin/prettier-direct call format-file \
"{\"filepath\":\"$PWD/fixtures/node-formatter/hello.ts\"}" \
"$PWD/fixtures/node-formatter"
- name: smoke eslint-direct
run: |
bin/eslint-direct call version '{}' "$PWD/fixtures/node-formatter"
- name: smoke dotnet-direct
run: |
bin/dotnet-direct call version '{}' "$PWD/fixtures/dotnet-csproj"
- name: smoke sbt-direct (non-fatal — sbt cold JVM may be slow on CI)
continue-on-error: true
run: |
bin/sbt-direct call version '{}' "$PWD/fixtures/scala-sbt"