From 40c504890b234f3466fd59c9fa8900a4d8be7df5 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 24 Jul 2023 15:30:15 +0200 Subject: [PATCH 01/12] Add GitHub Action to test the code --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..0375c5e6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +name: ci +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + ci: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node-version: [16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test From 5c9d0e7695fadcbd1e8a1b323c77aa87cf155496 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 24 Jul 2023 18:50:37 +0200 Subject: [PATCH 02/12] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0375c5e6..b3e43fab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + # branches: [ master ] jobs: ci: runs-on: ${{ matrix.os }} From 6699fa7d7d0cac44eb823e4b34fda95ddceafa2f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 24 Jul 2023 18:51:13 +0200 Subject: [PATCH 03/12] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3e43fab..0c49f6b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: ci on: push: - branches: [ master ] - pull_request: # branches: [ master ] + pull_request: + branches: [ master ] jobs: ci: runs-on: ${{ matrix.os }} From 273e7677c917c96aa7322a5062a085703967ddf9 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 24 Jul 2023 18:59:28 +0200 Subject: [PATCH 04/12] actions/checkout@v3 with submodules: true --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c49f6b1..a1875fa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v3 + with: + submodules: true - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} From d0e12e38643b8a822e84ef925cfd8aa212435364 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 24 Jul 2023 19:05:36 +0200 Subject: [PATCH 05/12] Linux install libxi-dev --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1875fa0..5af66129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get install -y build-essential libglew-dev libglu1-mesa-dev libxi-dev pkg-config - run: npm ci - run: npm run build --if-present - run: npm test From 25741035ffdcdb5ead1ce33ea8a007c10c8083df Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 24 Jul 2023 19:23:13 +0200 Subject: [PATCH 06/12] Update ci.yml --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5af66129..5e468684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,12 @@ jobs: matrix: node-version: [16.x, 18.x, 20.x] os: [ubuntu-latest, windows-latest, macos-latest] + exclude: # TODO: Remove the excludes and get the tests to pass + - os: ubuntu-latest + - os: macos-latest + node-version: 16.x + - os: macos-latest + node-version: 18.x steps: - uses: actions/checkout@v3 with: From 461e29d56503c7c1a8b79fba65157434987af59c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 26 Mar 2024 20:23:11 +0100 Subject: [PATCH 07/12] Update ci.yml --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e468684..9574a227 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,15 @@ jobs: exclude: # TODO: Remove the excludes and get the tests to pass - os: ubuntu-latest - os: macos-latest - node-version: 16.x - - os: macos-latest + - os: windows-latest node-version: 18.x + - os: windows-latest + node-version: 20.x steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - if: startsWith(matrix.os, 'ubuntu') From 2960c52e1b3025fbc9ad980510704c657f95ff0f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 26 Mar 2024 23:04:04 +0100 Subject: [PATCH 08/12] =?UTF-8?q?Run=20them=20all=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9574a227..6c2579a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,15 +11,8 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x] os: [ubuntu-latest, windows-latest, macos-latest] - exclude: # TODO: Remove the excludes and get the tests to pass - - os: ubuntu-latest - - os: macos-latest - - os: windows-latest - node-version: 18.x - - os: windows-latest - node-version: 20.x steps: - uses: actions/checkout@v4 with: From c1789205938f7e760a5aecd9c295bc0e25cff345 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 26 Mar 2024 23:33:07 +0100 Subject: [PATCH 09/12] Update ci.yml --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c2579a3..0a51cfd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,9 @@ jobs: with: node-version: ${{ matrix.node-version }} - if: startsWith(matrix.os, 'ubuntu') - run: sudo apt-get install -y build-essential libglew-dev libglu1-mesa-dev libxi-dev pkg-config + run: sudo apt-get install -y build-essential libgl1-mesa-dri libglapi-mesa + libglew-dev libglu1-mesa-dev libosmesa6 + libxi-dev mesa-utils pkg-config xvfb - run: npm ci - run: npm run build --if-present - run: npm test From 6cd3cb580616b41e34330f915a22b9e1c53cda75 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 26 Mar 2024 23:42:44 +0100 Subject: [PATCH 10/12] Update ci.yml --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a51cfd1..3c71b196 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,12 @@ jobs: - if: startsWith(matrix.os, 'ubuntu') run: sudo apt-get install -y build-essential libgl1-mesa-dri libglapi-mesa libglew-dev libglu1-mesa-dev libosmesa6 - libxi-dev mesa-utils pkg-config xvfb + libxi-dev mesa-utils pkg-config - run: npm ci - run: npm run build --if-present - - run: npm test + - if: startsWith(matrix.os, 'ubuntu') + uses: coactions/setup-xvfb@v1 + with: + run: npm test + - if: "!startsWith(matrix.os, 'ubuntu')" + run: npm test From 81bada1c01ec695a8d91dd11563bbda00d3d47d0 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 27 Mar 2024 00:12:29 +0100 Subject: [PATCH 11/12] xvfb-run npm test --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c71b196..3b7c7173 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,4 @@ jobs: libxi-dev mesa-utils pkg-config - run: npm ci - run: npm run build --if-present - - if: startsWith(matrix.os, 'ubuntu') - uses: coactions/setup-xvfb@v1 - with: - run: npm test - - if: "!startsWith(matrix.os, 'ubuntu')" - run: npm test + - run: xvfb-run npm test From ff1370519a4c097569b425f9482a350489cf5b2a Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 27 Mar 2024 00:18:08 +0100 Subject: [PATCH 12/12] xvfb-run only on Linux --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b7c7173..c0b1b402 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,7 @@ jobs: libxi-dev mesa-utils pkg-config - run: npm ci - run: npm run build --if-present - - run: xvfb-run npm test + - if: startsWith(matrix.os, 'ubuntu') + run: xvfb-run npm test + - if: "!startsWith(matrix.os, 'ubuntu')" + run: npm test