Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Provide pipeline for testing with NodeJS 20.x and 21.x #1154

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 5 additions & 37 deletions .github/workflows/insiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,8 @@ concurrency:
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: false

env:
CODE_TYPE: insider
TEST_RESOURCES: test-resources

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm

- name: Run Tests (macOS, windows)
if: matrix.os != 'ubuntu-latest'
run: |
npm run test
- name: Run Tests (linux)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run test
- name: Upload Screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots-${{ matrix.os }}
path: ${{ github.workspace }}/test/**/screenshots/*.png
test:
uses: ./.github/workflows/template-main.yaml
with:
version: latest
code_type: insider
22 changes: 22 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: NodeJS CI

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.node }}
strategy:
fail-fast: false
matrix:
node: [ lts/*, latest ]
uses: ./.github/workflows/template-main.yaml
with:
version: max
nodejs: ${{ matrix.node }}
13 changes: 11 additions & 2 deletions .github/workflows/template-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
version:
required: true
type: string
nodejs:
required: false
default: '18.x'
type: string
code_type:
required: false
default: 'stable'
type: string

jobs:
test:
Expand All @@ -17,6 +25,7 @@ jobs:
fail-fast: false

env:
CODE_TYPE: ${{ inputs.code_type }}
CODE_VERSION: ${{ inputs.version }}
TEST_RESOURCES: test-resources

Expand All @@ -27,7 +36,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: ${{ inputs.nodejs }}
cache: npm

- name: Run Tests (macOS, windows)
Expand All @@ -44,5 +53,5 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots-${{ matrix.os }}-${{ inputs.version }}
name: screenshots-${{ matrix.os }}-${{ inputs.version }}-node_${{ inputs.nodejs }}
path: ${{ github.workspace }}/test/**/screenshots/*.png
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

|NodeJS|Visual Studio Code|Operating System|
|--|--|--|
|<table style="text-align:center;"> <tr><th>16.x.x</th><th>18.x.x</th></tr><tr><td>✅</td><td></td></tr> </table>| <table style="text-align:center;"> <tr><th>min</th><th>-</th><th>max</th></tr><tr><td>1.84.2</td><td>1.85.2</td><td>1.86.2</td></tr> </table>| <table style="text-align:center;"> <tr><th>Linux</th><th>Windows</th><th>macOS</th></tr><tr><td>✅</td><td>✅</td><td>⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)</td></tr> </table>|
|<table style="text-align:center;"> <tr><th>18.x.x</th><th>LTS</th><th>Latest</th></tr><tr><td>✅</td><td>❓ 20.x.x</td><td>❓ 21.x.x</td></tr><tr><td colspan="3">❓ Best-effort</td></tr> </table>| <table style="text-align:center;"> <tr><th>min</th><th>-</th><th>max</th></tr><tr><td>1.84.x</td><td>1.85.x</td><td>1.86.x</td></tr> </table>| <table style="text-align:center;"> <tr><th>Linux</th><th>Windows</th><th>macOS</th></tr><tr><td>✅</td><td>✅</td><td>⚠️</td></tr><tr><td colspan="3">⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)</td></tr> </table>|

### Usage

Expand Down