Skip to content

Commit 59913e4

Browse files
authored
Merge pull request #966 from alcarney/fix-deps
Fix VSCode extension packaging
2 parents b437515 + 3e953c1 commit 59913e4

File tree

13 files changed

+3804
-624
lines changed

13 files changed

+3804
-624
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ updates:
1717
schedule:
1818
interval: "monthly"
1919

20-
- package-ecosystem: "pip"
21-
directory: "/code"
22-
target-branch: "develop"
23-
schedule:
24-
interval: "monthly"
25-
2620
- package-ecosystem: "pip"
2721
directory: "/lib/esbonio/tests/workspaces/demo"
2822
target-branch: "develop"

.github/workflows/vscode-pr.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/cache@v4
2929
with:
3030
path: ~/.cache/pip
31-
key: ${{ runner.os }}-vscode-pip-deps-${{ hashFiles('code/requirements.txt') }}
31+
key: ${{ runner.os }}-vscode-pip-deps-${{ hashFiles('code/requirements-*.txt') }}
3232
restore-keys: |
3333
${{ runner.os }}-vscode-pip-deps
3434
@@ -68,3 +68,40 @@ jobs:
6868
path: code/*.vsix
6969
if-no-files-found: error
7070
retention-days: 7
71+
72+
test:
73+
name: "Python v${{ matrix.python-version }}"
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 20
76+
strategy:
77+
fail-fast: false
78+
matrix:
79+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
80+
81+
steps:
82+
- uses: actions/checkout@v4
83+
84+
- uses: 'actions/setup-node@v4'
85+
with:
86+
node-version: 20.x
87+
cache: 'npm'
88+
cache-dependency-path: 'code/package-lock.json'
89+
90+
- name: Setup Python ${{ matrix.python-version }}
91+
uses: actions/setup-python@v5
92+
with:
93+
python-version: ${{ matrix.python-version }}
94+
allow-prereleases: true
95+
96+
- run: |
97+
cd code/
98+
make dev-deps
99+
npx tsc -p .
100+
101+
# Force the extension to use this version of Python
102+
python --version
103+
export ESBONIO_SERVER_PYCMD=$(command -v python)
104+
echo $ESBONIO_SERVER_PYCMD
105+
106+
xvfb-run -a npm run test
107+
name: Run Tests

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@
1717
],
1818
"preLaunchTask": "${defaultBuildTask}",
1919
},
20+
{
21+
"name": "VSCode Extension Tests",
22+
"type": "extensionHost",
23+
"request": "launch",
24+
"runtimeExecutable": "${execPath}",
25+
"testConfiguration": "${workspaceFolder}/code/.vscode-test.js",
26+
"args": [
27+
"--extensionDevelopmentPath=${workspaceFolder}/code",
28+
],
29+
"outFiles": ["${workspaceFolder}/code/dist/test/**/*.js"]
30+
},
2031
{
2132
"name": "pytest: esbonio",
2233
"type": "debugpy",

code/.vscode-test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { defineConfig } = require('@vscode/test-cli');
2+
3+
module.exports = defineConfig([
4+
{
5+
label: 'E2E Tests',
6+
files: 'dist/test/**/*.test.js',
7+
workspaceFolder: '../lib/esbonio/tests/workspaces/demo',
8+
mocha: {
9+
ui: 'tdd',
10+
timeout: 20000
11+
}
12+
}
13+
]);

code/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ ESBONIO ?= --pre esbonio
66
clean:
77
rm -r bundled node_modules dist
88

9+
.PHONY: test
10+
test: dev-deps $(NPM)
11+
-test -d dist && rm -r dist
12+
$(NPX) tsc -p .
13+
$(NPM) run test
14+
915
.PHONY: watch
1016
watch: dev-deps $(NPM)
1117
-test -d dist && rm -r dist

code/changes/965.fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing `exceptiongroup` package

0 commit comments

Comments
 (0)