html-to-text/node-html-to-text

View on GitHub
.github/workflows/lint.yml

Summary

Maintainability
Test Coverage
name: lint

on: [push, pull_request]

jobs:
  lint:
    name: Run linters

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Setup Node.js 16.x
        uses: actions/setup-node@v3
        with:
          node-version: 16.x

      - name: Setup NPM v7
        run: npm i -g npm@7

      - name: Get npm cache directory
        id: npm-cache-dir
        run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

      - 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: Touch cli file to prevent npm ci from freaking out
        uses: DamianReeves/write-file-action@v1.2
        with:
          path: packages/html-to-text-cli/bin/cli.js
          contents: '// placeholder'

      - run: npm ci

      - run: npm run lint