Skip to content

Consider JSDoc @import for non-exported types #12635

Consider JSDoc @import for non-exported types

Consider JSDoc @import for non-exported types #12635

Workflow file for this run

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/checkout@v4.2.2
- name: Setup Node.js
uses: actions/setup-node@v4.1.0
with:
cache: npm
node-version: 8 # Node.js 8 supported by Dart Sass v1.0.0
- name: Install package
run: |
npm install -g sass@v1.0.0
sass --version
- name: Run command
run: |
mkdir -p .tmp
time sass packages/govuk-frontend/src/govuk/all.scss > .tmp/all.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/all.css
dart-sass-latest:
name: Dart Sass v1 (latest)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Setup Node.js
uses: actions/setup-node@v4.1.0
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/all.css'
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/all.css
# Node Sass v3.7.0 = LibSass v3.5.0
lib-sass:
name: LibSass v3.5.0 (deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Setup Node.js
uses: actions/setup-node@v4.1.0
with:
cache: npm
node-version: 6 # Node.js 6 supported by Node Sass v3.7.0
- name: Install package
run: |
npm install -g node-sass@v3.7.0
node-sass --version
- name: Run command
run: |
mkdir -p .tmp
time node-sass packages/govuk-frontend/src/govuk/all.scss > .tmp/all.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/all.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/checkout@v4.2.2
- name: Setup Node.js
uses: actions/setup-node@v4.1.0
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/all.scss > .tmp/all.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/all.css
ruby-sass:
name: Ruby Sass v3.4.0 (deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- 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/all.scss > .tmp/all.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/all.css
ruby-sass-latest:
name: Ruby Sass v3 (latest, deprecated)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- 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/all.scss > .tmp/all.css
# Check output for uncompiled Sass
- name: Check output
run: |
! grep "\$govuk-" .tmp/all.css