Linting The Next.Js Frontend #1404
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Frontend Application | |
run-name: Linting The Next.Js Frontend | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
- main | |
- 'feature/**' | |
pull_request: | |
branches: | |
- develop | |
- master | |
- main | |
- 'feature/**' | |
jobs: | |
lint-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Configure npm authentication | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
cat .npmrc | |
- name: Clear npm cache | |
run: npm cache clean --force | |
- name: Install dependencies | |
run: | | |
cd frontend | |
npm ci | |
- name: Run linter | |
run: | | |
cd frontend | |
npm run lint |