-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (60 loc) · 1.89 KB
/
ci.yml
File metadata and controls
80 lines (60 loc) · 1.89 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
name: CI
on:
push:
pull_request:
jobs:
checks:
name: Lint & type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.15
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install npm dependencies
run: npm install
- name: Install Python tools
run: pip install ruff mypy
- name: Prettier
run: npx prettier --check "src/**/*.ts" "webviews/viewer/src/**/*.{ts,svelte}" "webviews/export/**/*.{js,css,html}"
- name: ESLint
run: npx eslint --max-warnings=0 src/ webviews/export/
- name: TypeScript
run: npx tsc --noEmit
- name: svelte-check
run: npx svelte-check --tsconfig webviews/viewer/tsconfig.json --fail-on-warnings
- name: Ruff lint
run: python3 -m ruff check python/lsp/ python/med2obj.py
- name: Ruff format
run: python3 -m ruff format --check python/lsp/ python/med2obj.py
- name: mypy
run: python3 -m mypy
build:
name: Package
runs-on: ubuntu-latest
needs: checks
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.15
- name: Install Python
run: sudo apt-get update && sudo apt-get install -y python3 python3-pip python3-nox python3-venv
- name: Install npm dependencies
run: npm install
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Build and package
run: python3 -m nox -s package -v --no-error-on-missing-interpreters
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: vsix-package
path: "*.vsix"
retention-days: 30