Workaround delays in ~/.npm
cache restore time
#10279
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: time sass packages/govuk-frontend/src/govuk/all.scss > /dev/null | |
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: time sh -c 'echo "@import "\""govuk/all"\"";" | sass --stdin --quiet-deps --load-path=packages/govuk-frontend/src > /dev/null' | |
# Node Sass v3.4.0 = LibSass v3.3.0 | |
lib-sass: | |
name: LibSass v3.3.0 (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: 4 # Node.js 4 supported by Node Sass v3.4.0 | |
- name: Install package | |
run: | | |
npm install -g [email protected] | |
node-sass --version | |
- name: Run command | |
run: time node-sass packages/govuk-frontend/src/govuk/all.scss > /dev/null | |
# 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: time node-sass packages/govuk-frontend/src/govuk/all.scss > /dev/null | |
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: time sass packages/govuk-frontend/src/govuk/all.scss > /dev/null | |
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: time sass packages/govuk-frontend/src/govuk/all.scss > /dev/null |