From 5683468b75e30f5daa437bfb17fed8b95ab1621f Mon Sep 17 00:00:00 2001 From: Dominik Jelinek Date: Mon, 26 Feb 2024 23:08:43 +0100 Subject: [PATCH] build: Provide pipeline for testing with NodeJS 20.x and 21.x Signed-off-by: Dominik Jelinek --- .github/workflows/insiders.yml | 42 ++++------------------------ .github/workflows/nodejs.yml | 24 ++++++++++++++++ .github/workflows/template-main.yaml | 13 +++++++-- README.md | 2 +- 4 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/insiders.yml b/.github/workflows/insiders.yml index d8f6b87b5..9e2cffdf5 100644 --- a/.github/workflows/insiders.yml +++ b/.github/workflows/insiders.yml @@ -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 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 000000000..10773c11c --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -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 }} diff --git a/.github/workflows/template-main.yaml b/.github/workflows/template-main.yaml index 5b3d409fc..b8c2af8b0 100644 --- a/.github/workflows/template-main.yaml +++ b/.github/workflows/template-main.yaml @@ -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: @@ -17,6 +25,7 @@ jobs: fail-fast: false env: + CODE_TYPE: ${{ inputs.code_type }} CODE_VERSION: ${{ inputs.version }} TEST_RESOURCES: test-resources @@ -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) @@ -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 diff --git a/README.md b/README.md index 8037add6b..e41afa23f 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ |NodeJS|Visual Studio Code|Operating System| |--|--|--| -|
16.x.x18.x.x
|
min-max
1.84.21.85.21.86.2
|
LinuxWindowsmacOS
⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)
| +|
18.x.x20.x.x21.x.x
❓ Best-effort
|
min-max
1.84.x1.85.x1.86.x
|
LinuxWindowsmacOS
⚠️
⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)
| ### Usage