|
name: PR Validation |
|
|
|
on: |
|
pull_request: |
|
|
|
permissions: {} |
|
|
|
env: |
|
NODE_VERSION: 22.17.0 |
|
TEST_RESULTS_DIRECTORY: . |
|
# Force a path with spaces and unicode chars to test extension works in these scenarios |
|
special-working-directory: './testDir' |
|
special-working-directory-relative: 'testDir' |
|
|
|
jobs: |
|
build-vsix: |
|
name: Create VSIX |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 |
|
with: |
|
persist-credentials: false |
|
|
|
- name: Build VSIX |
|
uses: ./.github/actions/build-vsix |
|
with: |
|
node_version: ${{ env.NODE_VERSION }} |
|
|
|
lint: |
|
name: Lint |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 |
|
with: |
|
persist-credentials: false |
|
|
|
- name: Lint |
|
uses: ./.github/actions/lint |
|
with: |
|
node_version: ${{ env.NODE_VERSION }} |
|
|
|
tests: |
|
name: Tests |
|
runs-on: ${{ matrix.os }} |
|
defaults: |
|
run: |
|
working-directory: ${{ env.special-working-directory }} |
|
strategy: |
|
fail-fast: false |
|
matrix: |
|
os: [ubuntu-latest, windows-2022] |
|
python: ['3.10', '3.11', '3.12', '3.13'] |
|
|
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 |
|
with: |
|
path: ${{ env.special-working-directory-relative }} |
|
persist-credentials: false |
|
|
|
# Install bundled libs using 3.10 (minimum supported; debugpy dropped 3.9 support, |
|
# and pip 26.1+ requires Python >= 3.10). |
|
- name: Use Python 3.10 |
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
|
with: |
|
python-version: '3.10' |
|
|
|
- name: Update pip, install pipx and install wheel |
|
run: python -m pip install -U pip pipx wheel |
|
shell: bash |
|
|
|
# This will install libraries to a target directory. |
|
- name: Install bundled python libraries |
|
run: pipx run nox --session install_bundled_libs |
|
shell: bash |
|
|
|
- name: Install Node |
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
|
with: |
|
node-version: ${{ env.NODE_VERSION }} |
|
cache: 'npm' |
|
cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json |
|
|
|
- name: Install dependencies (npm ci) |
|
run: npm ci |
|
|
|
# Now that the bundle is installed to target using python 3.9 |
|
# switch back the python we want to test with |
|
- name: Use Python ${{ matrix.python }} |
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
|
with: |
|
python-version: ${{ matrix.python }} |
|
|
|
# The new python may not have nox so install it again |
|
- name: Update pip, install pipx and install wheel (again) |
|
run: python -m pip install -U pip pipx wheel |
|
shell: bash |
|
|
|
- name: Start xvfb on Linux |
|
run: | |
|
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & |
|
echo "DISPLAY=:99" >> $GITHUB_ENV |
|
echo ">>> Started xvfb" |
|
if: ${{ runner.os }} == 'Linux' |
Check warning
on line 106
in .github/workflows/pr-check.yml
View workflow run for this annotation
GitHub Actions / PR Validation
Workflow syntax warning
.github/workflows/pr-check.yml (Line: 106, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
Check warning
on line 106
in .github/workflows/pr-check.yml
View workflow run for this annotation
GitHub Actions / PR Validation
Workflow syntax warning
.github/workflows/pr-check.yml (Line: 106, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
|
|
|
|
- name: Run tests |
|
run: pipx run nox --session tests |
|
shell: bash |
|
env: |
|
DISPLAY: ${{ env.DISPLAY }} |