Skip to content

Commit

Permalink
🔄 created local '.github/workflows/lint.yml' from remote 'templates/w…
Browse files Browse the repository at this point in the history
…orkflows/lint.yml'
  • Loading branch information
tec-bot committed Jan 30, 2025
1 parent b39b2d4 commit e64ceb7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'npm lint'
on:
pull_request:
workflow_dispatch:
paths:
- 'src/modules/**.js'
- 'src/resources/js/**.js'
- 'src/resources/postcss/**.pcss'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
# ------------------------------------------------------------------------------
# Setup Node.
# ------------------------------------------------------------------------------
- name: Check for .nvmrc file
id: check-nvmrc
run: |
if [ -f "${{ github.workspace }}/.nvmrc" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-node@v4
if: steps.check-nvmrc.outputs.exists == 'true'
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install node modules
run: npm ci
- name: Run linting tasks
run: npm run lint

0 comments on commit e64ceb7

Please sign in to comment.