Skip to content

Commit

Permalink
build: Provide pipeline for testing with NodeJS 20.x and 21.x
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek committed Feb 26, 2024
1 parent 9d32136 commit 5683468
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 40 deletions.
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
24 changes: 24 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: NodeJS CI

on:
push:
branches: [ main ]
pull_request: # TODO: remove this trigger
branches: [ main ]
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: [ 20.x, 21.x ]
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>20.x.x</th><th>21.x.x</th></tr><tr><td>✅</td><td></td><td>❓</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

0 comments on commit 5683468

Please sign in to comment.