Bump actions/setup-node from 4 to 5 #135
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Validation | |
on: | |
pull_request: | |
env: | |
NODE_VERSION: 18.17.1 | |
TEST_RESULTS_DIRECTORY: . | |
# Force a path with spaces and unicode chars to test extension works in these scenarios | |
special-working-directory: './🐍 🐛' | |
special-working-directory-relative: '🐍 🐛' | |
jobs: | |
build-vsix: | |
name: Create VSIX | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
- 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@v5 | |
- 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-latest, macos-latest] | |
python: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
path: ${{ env.special-working-directory-relative }} | |
# Install bundled libs using 3.9 even though you test it on other versions. | |
- name: Use Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Update pip, install wheel and nox | |
run: python -m pip install -U pip wheel nox | |
shell: bash | |
# This will install libraries to a target directory. | |
- name: Install bundled python libraries | |
run: | | |
export PYTHONUTF8=1 | |
export PYTHONIOENCODING=utf-8 | |
python -m nox --session install_bundled_libs | |
shell: bash | |
# 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@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
# The new python may not have nox so install it again | |
- name: Update pip, install wheel and nox (again) | |
run: python -m pip install -U pip wheel nox | |
shell: bash | |
- name: Run tests | |
run: python -m nox --session tests | |
shell: bash | |
ts-tests: | |
name: TypeScript Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
- name: Install Node | |
uses: actions/setup-node@v5 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
cache-dependency-path: ./package-lock.json | |
- name: Install Node dependencies | |
run: npm ci | |
shell: bash | |
- name: Compile TS tests | |
run: npm run pretest | |
shell: bash | |
- name: Run TS tests | |
uses: GabrielBB/[email protected] | |
with: | |
run: npm run test |