# This workflow will do a clean installation of node dependencies, cache/restore them, and run linting

name: Linting CI

on:
  push:
    branches: ['main']
  pull_request:
    branches: ['main']
permissions:
  contents: read
jobs:
  build:
    name: Run linters and check build scripts
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7
      - name: Use Node.js
        uses: actions/setup-node@v6
        with:
          node-version: '24.x'
          cache: 'npm'
      - name: Install
        run: yarn install
      - name: Run ESLint
        run: yarn lint:js
      - name: Run Stylelint
        run: yarn lint:css
      - name: Run Prettier
        run: yarn prettier-check
      - name: Build CSS
        run: yarn build:css
      - name: Build Tokens
        run: yarn build:tokens
      - name: Build Storybook
        run: yarn build-storybook
