-
Notifications
You must be signed in to change notification settings - Fork 109
60 lines (47 loc) · 1.55 KB
/
sass.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Sass
on: pull_request
jobs:
sass:
name: Dart Sass ${{ matrix.package-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
package-version:
# Release without major deprecations
- 1.77.6
# Release with `mixed-decls` deprecated
- 1.77.7
# Release with `import` deprecated
- 1.80.0
# Dart Sass latest major version
- latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install package
run: |
npm install -g sass@${{ matrix.package-version }}
sass --version
- name: Check compilation
run: |
mkdir -p .tmp
time sass packages/nhsuk.scss > .tmp/check.css
- name: Check load paths
run: |
mkdir -p .tmp
time sh -c 'echo "@import "\""nhsuk"\"";" | sass --stdin --load-path packages > .tmp/check1.css'
time sh -c 'echo "@forward "\""nhsuk"\"";" | sass --stdin --load-path packages > .tmp/check2.css'
time sh -c 'echo "@use "\""nhsuk"\"" as *;" | sass --stdin --load-path packages > .tmp/check3.css'
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$nhsuk-" .tmp/check.css
! grep "\$nhsuk-" .tmp/check1.css
! grep "\$nhsuk-" .tmp/check2.css
! grep "\$nhsuk-" .tmp/check3.css