mirror of
https://github.com/IT4Change/boilerplate-frontend.git
synced 2025-12-13 07:35:53 +00:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: "frontend:test:lint code with defined linters"
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
# only (but most important) job from this workflow required for pull requests
|
|
# check results serve as run conditions for all other jobs here
|
|
files-changed:
|
|
name: Detect File Changes - frontend-test-lint-code
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
changes: ${{ steps.changes.outputs.frontend-test-lint-code }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check for frontend file changes
|
|
uses: dorny/paths-filter@v3.0.1
|
|
id: changes
|
|
with:
|
|
token: ${{ github.token }}
|
|
filters: .github/file-filters.yml
|
|
list-files: shell
|
|
|
|
lint:
|
|
if: needs.files-changed.outputs.changes == 'true'
|
|
name: Lint - Frontend
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set Node version
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '>=21'
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Frontend | Lint
|
|
run: npm install && npm run test:lint |