Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve testing #495

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
branches:
- '**'

env:
CI: true

jobs:
test:
name: Test for Stylelint ${{ matrix.stylelint }} on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
Expand All @@ -36,25 +33,16 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"

- name: Cache npm cache
uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# 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
run: npm install --global [email protected]
# TODO: [email protected] is broken on Windows. See https://github.com/npm/cli/issues/4341
# run: npm install --global npm@latest
if: ${{ matrix.node-version == '18' }}
run: npm install --global npm@latest

- name: Install dependencies
run: npm ci
Expand Down
Loading