Skip to content

Commit 3120d10

Browse files
CI fix
1 parent d3a3bef commit 3120d10

5 files changed

Lines changed: 1182 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,23 @@ jobs:
1717

1818
- run: npm ci
1919

20-
- name: Format check
21-
run: npm run format:check
20+
- name: Format
21+
run: make format
2222

2323
- name: Lint
24-
run: npm run lint
24+
run: make lint
2525

2626
- name: Spell check
27-
uses: streetsidesoftware/cspell-action@v6
28-
with:
29-
files: "src/**/*.ts"
27+
run: make spellcheck
3028

3129
- name: Build
32-
run: npm run compile
33-
34-
- name: Unit tests
35-
run: npm run test:unit
30+
run: make build
3631

37-
- name: E2E tests with coverage
38-
run: xvfb-run -a npx vscode-test --coverage --grep @exclude-ci --invert
32+
- name: Test
33+
run: make test EXCLUDE_CI=true
3934

40-
- name: Coverage threshold (90%)
41-
run: npm run coverage:check
35+
- name: Package
36+
run: make package
4237

4338
website:
4439
runs-on: ubuntu-latest

Makefile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
.PHONY: format lint build package test test-exclude-ci ci
1+
.PHONY: format lint spellcheck build package test ci
22

33
format:
44
npx prettier --write "src/**/*.ts"
55

66
lint:
77
npx eslint src
88

9+
spellcheck:
10+
npx cspell "src/**/*.ts"
11+
912
build:
1013
npx tsc -p ./
1114

1215
package: build
1316
npx vsce package
1417

15-
test: build
16-
npm run test:unit
17-
npx vscode-test --coverage
18-
node tools/check-coverage.mjs
18+
UNAME := $(shell uname)
19+
EXCLUDE_CI ?= false
1920

20-
test-exclude-ci: build
21+
VSCODE_TEST_CMD = npx vscode-test --coverage
22+
ifeq ($(EXCLUDE_CI),true)
23+
VSCODE_TEST_CMD += --grep @exclude-ci --invert
24+
endif
25+
26+
ifeq ($(UNAME),Linux)
27+
VSCODE_TEST = xvfb-run -a $(VSCODE_TEST_CMD)
28+
else
29+
VSCODE_TEST = $(VSCODE_TEST_CMD)
30+
endif
31+
32+
test: build
2133
npm run test:unit
22-
npx vscode-test --coverage --grep @exclude-ci --invert
34+
$(VSCODE_TEST)
2335
node tools/check-coverage.mjs
2436

25-
ci: format lint build test package
37+
ci: format lint spellcheck build test package

cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
"visioncortex",
7272
"behaviour",
7373
"docstrings",
74+
"golangci",
75+
"gotestsum",
7476
"subproject"
7577
]
7678
}

0 commit comments

Comments
 (0)