Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Commit e709817

Browse files
committed
Run JS API tests for the Node embedded host
Since this provides a substantial amount of the Node embedded implementation, it's sometimes necessary to test that updates continue to pass (or begin to pass) the JS API tests, as for example in #83.
1 parent 3950072 commit e709817

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,90 @@ jobs:
5757
- name: Run tests
5858
run: dart run test -r expanded
5959

60+
# The versions should be kept up-to-date with the latest LTS Node releases.
61+
# They next need to be rotated October 2021. See
62+
# https://github.com/nodejs/Release.
63+
sass_spec:
64+
name: 'JS API Tests | Node ${{ matrix.node_version }} | ${{ matrix.os }}'
65+
runs-on: ${{ matrix.os }}-latest
66+
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
os: [ubuntu, windows, macos]
71+
node_version: [16]
72+
include:
73+
# Include LTS versions on Ubuntu
74+
- os: ubuntu
75+
node_version: 14
76+
- os: ubuntu
77+
node_version: 12
78+
79+
steps:
80+
- uses: actions/checkout@v2
81+
- uses: dart-lang/setup-dart@v1
82+
with: {sdk: stable}
83+
- uses: actions/setup-node@v2
84+
with: {node-version: "${{ matrix.node_version }}"}
85+
- uses: arduino/setup-protoc@v1
86+
with:
87+
version: ${{ env.PROTOC_VERSION }}
88+
repo-token: '${{ github.token }}'
89+
90+
- name: Check out Dart Sass
91+
uses: sass/clone-linked-repo@v1
92+
with: {repo: sass/dart-sass, default-ref: null}
93+
94+
- name: Add Dart Sass to pubspec
95+
run: |
96+
if [[ -d build/dart-sass ]]; then
97+
(
98+
echo "dependency_overrides:"
99+
echo " sass: {path: build/dart-sass}"
100+
echo " sass_api: {path: build/dart-sass/pkg/sass_api}"
101+
) >> pubspec.yaml
102+
fi
103+
shell: bash
104+
105+
- name: Check out embedded Sass protocol
106+
uses: sass/clone-linked-repo@v1
107+
with: {repo: sass/embedded-protocol, path: build/embedded-protocol}
108+
109+
- name: Check out the embedded host
110+
uses: sass/clone-linked-repo@v1
111+
with: {repo: sass/embedded-host-node}
112+
113+
- name: Check out the JS API definition
114+
uses: sass/clone-linked-repo@v1
115+
with: {repo: sass/sass, path: language}
116+
117+
- name: "Embedded host: npm install"
118+
run: npm install
119+
working-directory: embedded-host-node
120+
- name: "Embedded host: npm run init"
121+
run: |
122+
npm run init -- --protocol-path=../build/embedded-protocol --compiler-path=.. --api-path=../language
123+
working-directory: embedded-host-node
124+
125+
- name: Check out sass-spec
126+
uses: sass/clone-linked-repo@v1
127+
with: {repo: sass/sass-spec}
128+
129+
- name: Install sass-spec dependencies
130+
run: npm install
131+
working-directory: sass-spec
132+
133+
- name: Compile embedded host
134+
run: |
135+
npm run compile
136+
ln -s {`pwd`/,dist/}lib/src/vendor/dart-sass-embedded
137+
shell: bash
138+
working-directory: embedded-host-node
139+
140+
- name: Run tests
141+
run: npm run js-api-spec -- --sassPackage ../embedded-host-node --sassSassRepo ../language
142+
working-directory: sass-spec
143+
60144
static_analysis:
61145
name: Static analysis
62146
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)