From 3c590ec141d94ee810d4d3931d67acbaf7b10255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 28 Oct 2024 13:35:35 -0700 Subject: [PATCH] Run embedded JS API test on both dart and node compiler --- .github/workflows/test.yml | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ee23575b..167f4a7f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,24 +126,40 @@ jobs: working-directory: sass-spec sass_spec_js_embedded: - name: 'JS API Tests | Embedded | Node ${{ matrix.node-version }} | ${{ matrix.os }}' + name: "JS API Tests | Embedded ${{ matrix.js && 'Pure JS' || 'Dart' }} | Node ${{ matrix.node-version }} | ${{ matrix.os }}" runs-on: ${{ matrix.os }} if: "github.event_name != 'pull_request' || !contains(github.event.pull_request.body, 'skip sass-embedded')" strategy: fail-fast: false matrix: + js: [true, false] os: [ubuntu-latest, windows-latest, macos-latest] node-version: ['lts/*'] include: # Test older LTS versions - - os: ubuntu-latest + - js: true + os: ubuntu-latest dart_channel: stable node-version: lts/-1 - - os: ubuntu-latest + - js: true + os: ubuntu-latest dart_channel: stable node-version: lts/-2 - - os: ubuntu-latest + - js: true + os: ubuntu-latest + dart_channel: stable + node-version: lts/-3 + - js: false + os: ubuntu-latest + dart_channel: stable + node-version: lts/-1 + - js: false + os: ubuntu-latest + dart_channel: stable + node-version: lts/-2 + - js: false + os: ubuntu-latest dart_channel: stable node-version: lts/-3 @@ -166,19 +182,14 @@ jobs: - name: Initialize embedded host run: | npm install - npm run init -- --compiler-path=.. --language-path=../build/language + npm run init -- --compiler-path=.. --language-path=../build/language --compiler-js=${{ matrix.js && 'true' || 'false' }} npm run compile - mv {`pwd`/,dist/}lib/src/vendor/dart-sass working-directory: embedded-host-node - name: Version info run: | - path=embedded-host-node/dist/lib/src/vendor/dart-sass/sass - if [[ -f "$path.cmd" ]]; then "./$path.cmd" --version - elif [[ -f "$path.bat" ]]; then "./$path.bat" --version - elif [[ -f "$path.exe" ]]; then "./$path.exe" --version - else "./$path" --version - fi + node dist/bin/sass.js --version + working-directory: embedded-host-node - name: Run tests run: npm run js-api-spec -- --sassPackage ../embedded-host-node --sassSassRepo ../build/language