Skip to content

Commit

Permalink
workflow: Refactor VSCode PR Pipeline
Browse files Browse the repository at this point in the history
While there are no tests yet at the moment, we should at least build
the VSIX file.
  • Loading branch information
alcarney committed Oct 10, 2023
1 parent 84debf9 commit 1f3a30c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 111 deletions.
93 changes: 0 additions & 93 deletions .github/workflows/beta.yml

This file was deleted.

46 changes: 28 additions & 18 deletions .github/workflows/vscode-pr.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,64 @@
name: VSCode PR
name: 'PR: vscode'
on:
pull_request:
branches:
- develop
- release
paths:
- 'code/**'

jobs:
vscode:
name: Test Extension
runs-on: ubuntu-latest
steps:
- uses: 'actions/checkout@v4'

- uses: 'actions/setup-node@v3'
with:
node-version: 16.x
cache: 'npm'
cache-dependency-path: 'code/package-lock.json'

- uses: 'actions/setup-python@v4'
with:
python-version: "3.10"
# This must be the minimum Python version we support
python-version: "3.8"

- name: Pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-vscode-pip-deps-${{ hashFiles('code/requirements.txt') }}
restore-keys: |
${{ runner.os }}-vscode-pip-deps
- run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade bump2version
python -m pip install --upgrade bump2version tox
name: Install Build Tools
- run: |
set -e
# Despite the script's name, this is only used to obtain a
# dev version number e.g. v1.2.3-dev4
./scripts/make-release.sh vscode
name: Set Version
cd lib/esbonio
tox run -e pkg
echo "ESBONIO_WHL=$(find $(pwd)/dist -name '*.whl')" >> $GITHUB_ENV
name: Package Language Server
- run: |
set -e
cd code
npm ci
mkdir dist
npm test
name: Test Extension
./scripts/make-release.sh vscode
name: Set Versions
- run: |
set -e
echo "whl=${ESBONIO_WHL}"
cd code
rm -r dist
ESBONIO_WHL=${ESBONIO_WHL} tox run -e bundle-deps
npm ci --prefer-offline
npm run package
id: assets
name: Package Extension
Expand All @@ -60,3 +68,5 @@ jobs:
with:
name: 'vsix'
path: code/*.vsix
if-no-files-found: error
retention-days: 7
1 change: 1 addition & 0 deletions code/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.bumpversion.cfg
.tox
.pytest_cache
**/__pycache__/**
**/.pyc
Expand Down

0 comments on commit 1f3a30c

Please sign in to comment.