Skip to content

Commit 0927ea7

Browse files
committed
Run embedded JS API test on both dart and node compiler
1 parent f5d0b0d commit 0927ea7

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,40 @@ jobs:
128128
working-directory: sass-spec
129129

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

135135
strategy:
136136
fail-fast: false
137137
matrix:
138+
js: [true, false]
138139
os: [ubuntu-latest, windows-latest, macos-latest]
139140
node-version: ['lts/*']
140141
include:
141142
# Test older LTS versions
142-
- os: ubuntu-latest
143+
- js: true
144+
os: ubuntu-latest
143145
dart_channel: stable
144146
node-version: lts/-1
145-
- os: ubuntu-latest
147+
- js: true
148+
os: ubuntu-latest
146149
dart_channel: stable
147150
node-version: lts/-2
148-
- os: ubuntu-latest
151+
- js: true
152+
os: ubuntu-latest
153+
dart_channel: stable
154+
node-version: lts/-3
155+
- js: false
156+
os: ubuntu-latest
157+
dart_channel: stable
158+
node-version: lts/-1
159+
- js: false
160+
os: ubuntu-latest
161+
dart_channel: stable
162+
node-version: lts/-2
163+
- js: false
164+
os: ubuntu-latest
149165
dart_channel: stable
150166
node-version: lts/-3
151167

@@ -168,19 +184,13 @@ jobs:
168184
- name: Initialize embedded host
169185
run: |
170186
npm install
171-
npm run init -- --compiler-path=.. --language-path=../build/language
187+
npm run init -- --compiler-path=.. --language-path=../build/language --compiler-js=${{ matrix.js && 'true' || 'false' }}
172188
npm run compile
173-
mv {`pwd`/,dist/}lib/src/vendor/dart-sass
174189
working-directory: embedded-host-node
175190

176191
- name: Version info
177-
run: |
178-
path=embedded-host-node/dist/lib/src/vendor/dart-sass/sass
179-
if [[ -f "$path.cmd" ]]; then "./$path.cmd" --version
180-
elif [[ -f "$path.bat" ]]; then "./$path.bat" --version
181-
elif [[ -f "$path.exe" ]]; then "./$path.exe" --version
182-
else "./$path" --version
183-
fi
192+
run: node dist/bin/sass.js --version
193+
working-directory: embedded-host-node
184194

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

0 commit comments

Comments
 (0)