Skip to content

Commit 1905269

Browse files
authored
package test
1 parent 20e186f commit 1905269

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.github/workflows/main.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: 'Build VSIX'
2+
description: "Build the extension's VSIX"
3+
4+
inputs:
5+
node_version:
6+
description: 'Version of Node to install'
7+
required: true
8+
vsix_name:
9+
description: 'Name to give the final VSIX'
10+
required: true
11+
artifact_name:
12+
description: 'Name to give the artifact containing the VSIX'
13+
required: true
14+
15+
runs:
16+
using: 'composite'
17+
steps:
18+
- name: Install Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ inputs.node_version }}
22+
cache: 'npm'
23+
24+
# Jedi LS depends on dataclasses which is not in the stdlib in Python 3.7.
25+
- name: Use Python 3.8 for JediLSP
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: 3.8
29+
cache: 'pip'
30+
cache-dependency-path: |
31+
requirements.txt
32+
build/build-install-requirements.txt
33+
pythonFiles/jedilsp_requirements/requirements.txt
34+
35+
- name: Upgrade Pip
36+
run: python -m pip install -U pip
37+
shell: bash
38+
39+
# For faster/better builds of sdists.
40+
- name: Install build pre-requisite
41+
run: python -m pip install wheel
42+
shell: bash
43+
44+
- name: Install Python dependencies
45+
uses: brettcannon/pip-secure-install@v1
46+
with:
47+
options: '-t ./pythonFiles/lib/python --implementation py'
48+
49+
- name: Install debugpy and get-pip
50+
run: |
51+
python -m pip --disable-pip-version-check install packaging
52+
python ./pythonFiles/install_debugpy.py
53+
python ./pythonFiles/download_get_pip.py
54+
shell: bash
55+
56+
- name: Install Jedi LSP
57+
uses: brettcannon/pip-secure-install@v1
58+
with:
59+
requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt'
60+
options: '-t ./pythonFiles/lib/jedilsp --implementation py --platform any --abi none'
61+
62+
- name: Run npm ci
63+
run: npm ci --prefer-offline
64+
shell: bash
65+
66+
# Use the GITHUB_RUN_ID environment variable to update the build number.
67+
# GITHUB_RUN_ID is a unique number for each run within a repository.
68+
# This number does not change if you re-run the workflow run.
69+
- name: Update extension build number
70+
run: npm run updateBuildNumber -- --buildNumber $GITHUB_RUN_ID
71+
shell: bash
72+
73+
- name: Update optional extension dependencies
74+
run: npm run addExtensionPackDependencies
75+
shell: bash
76+
77+
- name: Build VSIX
78+
run: npm run package
79+
shell: bash
80+
81+
- name: Rename VSIX
82+
# Move to a temp name in case the specified name happens to match the default name.
83+
run: mv ms-python-insiders.vsix ms-python-temp.vsix && mv ms-python-temp.vsix ${{ inputs.vsix_name }}
84+
shell: bash
85+
86+
- name: Upload VSIX
87+
uses: actions/upload-artifact@v3
88+
with:
89+
name: ${{ inputs.artifact_name }}
90+
path: ${{ inputs.vsix_name }}
91+
if-no-files-found: error
92+
retention-days: 7

0 commit comments

Comments
 (0)