forked from oxc-project/oxc
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (99 loc) · 3.43 KB
/
Copy pathci_vscode.yml
File metadata and controls
114 lines (99 loc) · 3.43 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
name: VSCode CI
permissions: {}
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
branches-ignore:
- "**/graphite-base/**"
paths:
- "pnpm-lock.yaml"
- "crates/oxc_language_server/**"
- "apps/oxlint/src/**"
- "apps/oxlint/src-js/**"
- "apps/oxfmt/src/**"
- "apps/oxfmt/src-js/**"
- "editors/vscode/**"
- "tasks/vscode_docs/**"
- ".github/workflows/ci_vscode.yml"
push:
branches:
- main
paths:
- "pnpm-lock.yaml"
- "crates/oxc_language_server/**"
- "apps/oxlint/src/**"
- "apps/oxlint/src-js/**"
- "apps/oxfmt/src/**"
- "apps/oxfmt/src-js/**"
- "editors/vscode/**"
- "tasks/vscode_docs/**"
- ".github/workflows/ci_vscode.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
test:
name: Test VSCode
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@3ab630d442e198ebb0ca30872832406ca01c46eb # v1.4.0
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6
- uses: oxc-project/setup-rust@c8224157c0bf235aabc633e8cd50d344f087a7de # v1.0.12
with:
save-cache: ${{ github.ref_name == 'main' }}
cache-key: vscode
- name: Check VSCode README is up-to-date
run: |
cargo run -p vscode_docs update
pnpm fmt
git diff --exit-code
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: oxlint
with:
filters: |
src:
- "pnpm-lock.yaml"
- "crates/oxc_language_server/**"
- "apps/oxlint/src/**"
- "apps/oxlint/src-js/**"
- "editors/vscode/**"
- ".github/workflows/ci_vscode.yml"
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: oxfmt
with:
filters: |
src:
- "pnpm-lock.yaml"
- "crates/oxc_language_server/**"
- "apps/oxfmt/src/**"
- "apps/oxfmt/src-js/**"
- "editors/vscode/**"
- ".github/workflows/ci_vscode.yml"
- name: Build oxlint (with napi)
if: steps.oxlint.outputs.src == 'true'
working-directory: editors/vscode
run: pnpm run oxlint:build:debug
- name: Build oxfmt (with napi)
if: steps.oxfmt.outputs.src == 'true'
working-directory: editors/vscode
run: pnpm run oxfmt:build:debug
- name: Compile VSCode
working-directory: editors/vscode
run: pnpm run compile
- name: VSCode Unit Tests
working-directory: editors/vscode
run: xvfb-run -a pnpm run test:unit
- name: VSCode oxlint tests
if: steps.oxlint.outputs.src == 'true'
working-directory: editors/vscode
run: xvfb-run -a pnpm run test:oxlint && xvfb-run -a pnpm run test:oxlint-multi-root
- name: VSCode oxlint plugin test (flaky)
if: steps.oxlint.outputs.src == 'true'
working-directory: editors/vscode
continue-on-error: true
run: xvfb-run -a pnpm run test:oxlint-js
- name: VSCode oxfmt tests
if: steps.oxfmt.outputs.src == 'true'
working-directory: editors/vscode
run: xvfb-run -a pnpm run test:oxfmt