0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/.github/workflows/css.yml
Romaric Pascal 33ccbc23e3
SCSS testing of the utilities API (#36029)
* Set up CSS testing using sass-true and mocha

Use mocha to handle the heavy lifting of finding tests and running them.
Mocha is made to look directly for SCSS files which are compiled
thanks to Node's require.extensions mechanism.

* Add CSS tests to workflow

* Add tests for the generate-utility mixin

* Add tests for utilities generation

* Fix linting issues

* Fix test contents

Don't know why the whole utilities.test.scss ended up copied in the api.test.scss

* Remove unnecessary entry in package.json

* Move to Jasmine for running the tests

* Move running of CSS tests before CSS build

* Update linting set up

Add exceptions for test files in stylelint

* Remove irrelevant option for sass-true

* Fix linting issues after rebase

* Add color mode tests

* Fix linter

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-12-24 14:29:20 -08:00

41 lines
651 B
YAML

name: CSS
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 18
permissions:
contents: read
jobs:
css:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Run CSS tests
run: npm run css-test
- name: Build CSS
run: npm run css