Skip to content

Commit 257b4fd

Browse files
committed
Run embedded JS API test on both dart and node compiler
1 parent 7ffed6e commit 257b4fd

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@ jobs:
126126
working-directory: sass-spec
127127

128128
sass_spec_js_embedded:
129-
name: 'JS API Tests | Embedded | Node ${{ matrix.node-version }} | ${{ matrix.os }}'
129+
name: "JS API Tests | Embedded ${{ matrix.js && 'Pure JS' || 'Dart' }} | Node ${{ matrix.node-version }} | ${{ matrix.os }}"
130130
runs-on: ${{ matrix.os }}
131131
if: "github.event_name != 'pull_request' || !contains(github.event.pull_request.body, 'skip sass-embedded')"
132132

133133
strategy:
134134
fail-fast: false
135135
matrix:
136+
js: [true, false]
136137
os: [ubuntu-latest, windows-latest, macos-latest]
137138
node-version: ['lts/*']
138139
include:
@@ -166,19 +167,25 @@ jobs:
166167
- name: Initialize embedded host
167168
run: |
168169
npm install
169-
npm run init -- --compiler-path=.. --language-path=../build/language
170+
npm run init -- --compiler-path=.. --language-path=../build/language --compiler-js=${{ matrix.js && 'true' || 'false' }}
170171
npm run compile
172+
if ${{ matrix.js && 'false' || 'true' }}; then
171173
mv {`pwd`/,dist/}lib/src/vendor/dart-sass
174+
fi
172175
working-directory: embedded-host-node
173176

174177
- name: Version info
175178
run: |
179+
if ${{ matrix.js && 'true' || 'false' }}; then
180+
node embedded-host-node/node_modules/sass/sass.js --version
181+
else
176182
path=embedded-host-node/dist/lib/src/vendor/dart-sass/sass
177183
if [[ -f "$path.cmd" ]]; then "./$path.cmd" --version
178184
elif [[ -f "$path.bat" ]]; then "./$path.bat" --version
179185
elif [[ -f "$path.exe" ]]; then "./$path.exe" --version
180186
else "./$path" --version
181187
fi
188+
fi
182189
183190
- name: Run tests
184191
run: npm run js-api-spec -- --sassPackage ../embedded-host-node --sassSassRepo ../build/language

0 commit comments

Comments
 (0)