Skip to content

Commit a18877b

Browse files
authored
Add CI for extension (#27)
1 parent 8c63bd4 commit a18877b

File tree

6 files changed

+39
-19
lines changed

6 files changed

+39
-19
lines changed

.github/workflows/publish-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
key: publish-${{ hashFiles('pyproject.toml') }}
2020
- uses: extractions/setup-just@v2
2121
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
22-
- run: just publish
22+
- run: just publish-package
2323
env:
2424
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

.github/workflows/publish-vscode-extension.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- uses: actions/setup-node@v4
15-
with:
16-
node-version: 20
1715
- run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
1816
- run: npm ci
1917
- run: npx @vscode/vsce publish --pat ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}

.github/workflows/test.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
DEFAULT_PYTHON_VERSION: "3.12"
1616

1717
jobs:
18-
check-types:
18+
check-types-py:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
@@ -30,7 +30,7 @@ jobs:
3030
- uses: extractions/setup-just@v2
3131
- run: just install check-types
3232

33-
lint:
33+
lint-py:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
4545
- uses: extractions/setup-just@v2
4646
- run: just install lint
4747

48-
test:
48+
test-py:
4949
runs-on: ubuntu-latest
5050
strategy:
5151
fail-fast: false
@@ -66,3 +66,19 @@ jobs:
6666
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
6767
- uses: extractions/setup-just@v2
6868
- run: just install test
69+
70+
check-types-ts:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
- uses: actions/setup-node@v4
75+
- run: npm ci
76+
- run: npm run compile
77+
78+
lint-ts:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
- uses: actions/setup-node@v4
83+
- run: npm ci
84+
- run: npm run lint

.vscode/launch.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"--extensionDevelopmentPath=${workspaceFolder}",
1010
"${workspaceFolder}/testing"
1111
],
12-
"outFiles": [
13-
"${workspaceFolder}/dist/*.js"
14-
],
12+
"outFiles": ["${workspaceFolder}/dist/*.js"],
1513
"preLaunchTask": "npm: watch"
1614
}
1715
]

Justfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
1-
default: install install-testing lint check-types test
1+
default: install lint check-types test
22

33
install:
44
uv lock
55
uv sync
66

7-
install-testing:
8-
cd testing && uv lock && uv sync
9-
10-
test *args:
11-
@.venv/bin/pytest -- {{ args }}
12-
137
lint:
148
uv -q run ruff check .
159
uv -q run ruff format .
1610

1711
check-types:
1812
uv -q run mypy .
1913

20-
publish:
14+
test *args:
15+
@.venv/bin/pytest -- {{ args }}
16+
17+
publish-package:
2118
rm -rf dist/*
2219
uv tool run --from build python -m build --installer uv
2320
uv tool run twine check dist/*
2421
uv tool run twine upload dist/* --username __token__ --password $PYPI_TOKEN
2522

2623
run *args:
2724
@.venv/bin/auto-typing-final {{ args }}
25+
26+
extension: install-ts check-types-ts lint-ts
27+
28+
install-ts:
29+
npm ci
30+
31+
check-types-ts:
32+
npm run compile
33+
34+
lint-ts:
35+
npm run lint

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
]
2828
},
2929
"scripts": {
30-
"fmt": "biome format --write .",
31-
"package": "tsc -p ./",
30+
"lint": "biome format --write .",
31+
"compile": "tsc -p ./",
3232
"watch": "tsc -watch -p ./",
3333
"vscode:prepublish": "npm run compile"
3434
},

0 commit comments

Comments
 (0)