Skip to content

Commit

Permalink
Add tests for Sass versions
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Feb 20, 2025
1 parent 956ebca commit d136d80
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/sass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Sass

on: pull_request

jobs:
sass:
name: Dart Sass ${{ matrix.package-version }} (Node.js ${{ matrix.node-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
- 1.x

node-version:
- 20
- 22

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node-version }}

- name: Install package
run: |
npm install -g sass@${{ matrix.package-version }}
sass --version
- name: Check Sass
run: time sass packages/nhsuk.scss > /dev/null

- name: Check Sass '@import' syntax
run: time sh -c 'echo "@import "\""nhsuk"\"";" | sass --stdin --load-path packages > /dev/null'

- name: Check Sass '@use' syntax
run: time sh -c 'echo "@use "\""nhsuk"\"" as *;" | sass --stdin --load-path packages > /dev/null'

0 comments on commit d136d80

Please sign in to comment.