Skip to content

Commit

Permalink
Create testonwindows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-govindaraj authored Sep 5, 2024
1 parent 7d13529 commit 8baa61a
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/testonwindows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Build VSIX'
description: "Build the extension's VSIX"

inputs:
node_version:
description: 'Version of Node to install'
required: true

runs:
using: 'composite'
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
cache: 'npm'

# Minimum supported version is Python 3.8
- name: Use Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-build-vsix-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-build-vsix-
# For faster/better builds of sdists.
- name: Update pip, install pipx and install wheel
run: python -m pip install -U pip pipx wheel
shell: bash

- name: Run npm ci
run: npm ci --prefer-offline
shell: bash

- name: Install bundled python libraries
run: pipx run nox --session install_bundled_libs
shell: bash

# Use the GITHUB_RUN_ID environment variable to update the build number.
# GITHUB_RUN_ID is a unique number for each run within a repository.
# This number does not change if you re-run the workflow run.
- name: Update extension build number
run: pipx run nox --session update_build_number -- $GITHUB_RUN_ID
shell: bash

- name: Build VSIX
run: npm run vsce-package
shell: bash

- name: Upload VSIX
uses: actions/upload-artifact@v3
with:
name: linter-package
path: |
**/*.vsix
if-no-files-found: error
retention-days: 7

0 comments on commit 8baa61a

Please sign in to comment.