Skip to content

Commit

Permalink
ci: simplify linting by reusable workflow (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous authored Nov 1, 2023
1 parent a4e368b commit d03227e
Showing 1 changed file with 1 addition and 42 deletions.
43 changes: 1 addition & 42 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,6 @@ on:
branches:
- '**'

env:
CI: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [18]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- 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-
- name: Install latest npm
run: npm install --global npm@latest

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
uses: stylelint/.github/.github/workflows/lint.yml@main

0 comments on commit d03227e

Please sign in to comment.