.github/workflows/lint.yml
name: Daffodil Lint
env:
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
on:
push:
paths:
- '**.ts'
- '**.scss'
- '**.html'
- '**.js'
- '**.json'
- '.github/**'
branches:
- develop
tags: ["v*"]
pull_request:
paths:
- '**.ts'
- '**.scss'
- '**.html'
- '**.js'
- '**.json'
- '.github/**'
branches:
- develop
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node: [18.19.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
name: Derive appropriate SHAs for base and head for `nx affected` commands
with:
main-branch-name: 'develop'
- uses: actions/cache@v3
name: Lint Cache
id: lint_cache
with:
path: .nx_cache
key: lint-${{ matrix.node }}
- uses: graycoreio/github-actions/clear-old-nx-cache@main
with:
size-in-mb: 10
- uses: graycoreio/github-actions/setup-node@main
with:
node-version: ${{ matrix.node }}
use-stamp-cache: true
- run: npx nx affected --target=lint