Skip to content

Commit 250817b

Browse files
committed
workflow: Run tests using project devcontainer image
1 parent 7b12ef2 commit 250817b

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

.devcontainer/tools.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ PY$(subst .,,$1) := $$(BIN)/python$1
6565

6666
$$(PY$(subst .,,$1)): | $$(UV)
6767
$$(UV) python find $1 || $$(UV) python install $1
68-
ln -s $$$$($$(UV) python find $1) $$@
69-
7068
$$@ --version
7169

7270
endif

.github/workflows/vscode-pr.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ jobs:
7272
test:
7373
name: "Python v${{ matrix.python-version }}"
7474
runs-on: ubuntu-latest
75+
container:
76+
image: ghcr.io/swyddfa/esbonio-devenv
77+
credentials:
78+
username: ${{ github.actor }}
79+
password: ${{ secrets.github_token }}
80+
7581
timeout-minutes: 20
7682
strategy:
7783
fail-fast: false
@@ -81,18 +87,6 @@ jobs:
8187
steps:
8288
- uses: actions/checkout@v4
8389

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-
9690
- run: |
9791
cd code/
9892
make dev-deps
@@ -103,5 +97,5 @@ jobs:
10397
export ESBONIO_SERVER_PYCMD=$(command -v python)
10498
echo $ESBONIO_SERVER_PYCMD
10599
106-
xvfb-run -a npm run test
100+
xvfb-run -a $(command -v npm) run test
107101
name: Run Tests

code/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ include ../.devcontainer/tools.mk
22

33
ESBONIO ?= --pre esbonio
44

5+
export PATH := $(BIN):$(PATH)
6+
57
.PHONY: clean
68
clean:
79
rm -r bundled node_modules dist

0 commit comments

Comments
 (0)