Skip to content

Commit

Permalink
Run embedded JS API test on both dart and node compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Oct 28, 2024
1 parent 7ffed6e commit 6b96c4a
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
npx sass --version
working-directory: embedded-host-node

- name: Run tests
run: npm run js-api-spec -- --sassPackage ../embedded-host-node --sassSassRepo ../build/language
Expand Down

0 comments on commit 6b96c4a

Please sign in to comment.