Configure Dependabot for Jest dependencies #578
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: Testing | |
on: | |
push: | |
branches: | |
- main | |
- v1.* | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
test: | |
name: Test for Stylelint ${{ matrix.stylelint }} on Node.js ${{ matrix.node-version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18] | |
os: [ubuntu-latest, macos-latest] | |
stylelint: [14, 15] | |
include: | |
- stylelint: 15 | |
node-version: 14 # For some reason jest-runner-vscode doesn't work well with Node v18 and Windows. | |
os: windows-latest | |
- stylelint: 14 | |
node-version: 14 # For some reason jest-runner-vscode doesn't work well with Node v18 and Windows. | |
os: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
# TODO: [email protected] is broken on Windows. See https://github.com/npm/cli/issues/4341 | |
- name: Workaround for npm installation failure on Node.js 14 and Windows | |
if: ${{ matrix.node-version == '14' && runner.os == 'Windows' }} | |
run: npm install --global [email protected] | |
- name: Install latest npm | |
if: ${{ matrix.node-version == '18' }} | |
run: npm install --global npm@latest | |
- name: Install dependencies | |
run: npm ci | |
- name: Install stylelint v15 | |
run: npm i -D stylelint@^15 | |
if: matrix.stylelint == 15 | |
- name: Install stylelint v14 | |
run: npm i -D stylelint@^14 stylelint-scss@^4.3.0 | |
if: matrix.stylelint == 14 | |
- name: Cache VS Code binaries | |
uses: actions/cache@v3 | |
id: vscode-cache | |
with: | |
path: .vscode-test | |
key: ${{ runner.os }}-vscode-${{ hashFiles('test/e2e/jest-runner-vscode.config.js') }} | |
restore-keys: | | |
${{ runner.os }}-vscode- | |
- name: Download VS Code | |
run: npm run download-vscode | |
- name: Run unit tests | |
run: npm run test:unit -- --coverage | |
- name: Run integration tests | |
run: npm run test:integration -- --coverage | |
- name: Run end-to-end tests (Linux) | |
if: runner.os == 'Linux' | |
run: xvfb-run -a npm run test:e2e -- --silent | |
- name: Run end-to-end tests (non-Linux) | |
if: runner.os != 'Linux' | |
run: npm run test:e2e -- --silent |