-
Notifications
You must be signed in to change notification settings - Fork 333
201 lines (161 loc) · 5.11 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: Sass
on:
pull_request:
push:
branches:
- main
- 'feature/**'
- 'support/**'
workflow_dispatch:
concurrency:
group: sass-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
dart-sass:
name: Dart Sass v1.0.0
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: npm
node-version: 8 # Node.js 8 supported by Dart Sass v1.0.0
- name: Install package
run: |
npm install -g [email protected]
sass --version
- name: Run command
run: |
mkdir -p .tmp
time sass packages/govuk-frontend/src/govuk/index.scss > .tmp/index.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/index.css
dart-sass-latest:
name: Dart Sass v1 (latest)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: npm
node-version-file: .nvmrc # Node.js project version must support Dart Sass v1
- name: Install package
run: |
npm install -g sass@v1
sass --version
# Treat GOV.UK Frontend as a dependency by importing it via load paths,
# allowing us to mimic the way we recommend our users silence deprecation
# warnings using the `quiet-deps` flag.
#
# Run the command through a shell to ensure `time` measures the time
# taken by the entire pipeline, as we are now piping input into `sass`.
- name: Run command
run: |
mkdir -p .tmp
time sh -c 'echo "@import "\""govuk/all"\"";" | sass --stdin --quiet-deps --load-path=packages/govuk-frontend/src > .tmp/index.css'
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/index.css
# Node Sass v5.0.0 = LibSass v3.5.5
lib-sass:
name: LibSass v3.5.5 (deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: npm
# Node.js 15 is required for the stable support of ES Module
# used when installing `node-sass`
node-version: 15
- name: Install package
# Sass 5.0.0 is the first version that supports Python 3
# and as such can be built on a GitHub Actions runner
run: |
npm install -g [email protected]
node-sass --version
- name: Run command
run: |
mkdir -p .tmp
time node-sass packages/govuk-frontend/src/govuk/index.scss > .tmp/index.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/index.css
# Node Sass v8.x = LibSass v3 latest
lib-sass-latest:
name: LibSass v3 (latest, deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: npm
node-version-file: .nvmrc # Node.js project version must support Node Sass v8.x
- name: Install package
run: |
npm install -g node-sass@v8
node-sass --version
- name: Run command
run: |
mkdir -p .tmp
time node-sass packages/govuk-frontend/src/govuk/index.scss > .tmp/index.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/index.css
ruby-sass:
name: Ruby Sass v3.4.0 (deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.3 # Oldest version supported by Bundler v2
- name: Install gem
run: |
gem install sass -v 3.4.0
sass --version
- name: Run command
run: |
mkdir -p .tmp
time sass packages/govuk-frontend/src/govuk/index.scss > .tmp/index.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/index.css
ruby-sass-latest:
name: Ruby Sass v3 (latest, deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2 # Ruby 3.2 supported by Ruby Sass v3
- name: Install gem
run: |
gem install sass -v '~> 3.0'
sass --version
- name: Run command
run: |
mkdir -p .tmp
time sass packages/govuk-frontend/src/govuk/index.scss > .tmp/index.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/index.css