Skip to content

Add linters

Add linters #146

Workflow file for this run

name: 'Unit'
on:
push:
branches:
- 'main'
- 'release/**/*'
pull_request:
branches:
- 'main'
- 'release/**/*'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
lint:
uses: 'google-github-actions/.github/.github/workflows/lint.yml@sethvargo/lint' # ratchet:exclude

Check failure on line 20 in .github/workflows/unit.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/unit.yml

Invalid workflow file

error parsing called workflow ".github/workflows/unit.yml" -> "google-github-actions/.github/.github/workflows/lint.yml@sethvargo/lint" (source branch with sha:b6167da963bd91f59209584a69ce4fa2b1d01154) : workflow is not reusable as it is missing a `on.workflow_call` trigger
unit:
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'windows-latest'
- 'macos-latest'
runs-on: '${{ matrix.os }}'
steps:
- uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
- uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
with:
node-version-file: 'package.json'
- name: 'npm build'
run: 'npm ci && npm run build'
- name: 'npm lint'
# There's no need to run the linter for each operating system, since it
# will find the same thing 3x and clog up the PR review.
if: |-
${{ matrix.os == 'ubuntu-latest' }}
run: 'npm run lint'
- name: 'npm test'
run: 'npm run test'