mirror of
https://github.com/IT4Change/boilerplate-frontend.git
synced 2025-12-13 07:35:53 +00:00
Merge pull request #2 from IT4Change/github-workflows
feat(workflow): test:lint code - workflow
This commit is contained in:
commit
5b57f8e464
1
.github/.remarkignore
vendored
Normal file
1
.github/.remarkignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*
|
||||||
4
.github/file-filters.yml
vendored
Normal file
4
.github/file-filters.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# These file filter patterns are used by the action https://github.com/dorny/paths-filter
|
||||||
|
|
||||||
|
frontend: &frontend
|
||||||
|
- '**/*'
|
||||||
34
.github/workflows/test.lint.code.yml
vendored
Normal file
34
.github/workflows/test.lint.code.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: "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
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
frontend: ${{ steps.changes.outputs.frontend }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.3.0
|
||||||
|
|
||||||
|
- name: Check for frontend file changes
|
||||||
|
uses: dorny/paths-filter@v2.11.1
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
token: ${{ github.token }}
|
||||||
|
filters: .github/file-filters.yml
|
||||||
|
list-files: shell
|
||||||
|
|
||||||
|
lint:
|
||||||
|
if: needs.files-changed.outputs.frontend == 'true'
|
||||||
|
name: Lint - Frontend
|
||||||
|
needs: files-changed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Frontend | Lint
|
||||||
|
run: npm install && npm run test:lint
|
||||||
@ -7,6 +7,9 @@ on:
|
|||||||
- edited
|
- edited
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
name: Validate PR title
|
name: Validate PR title
|
||||||
Loading…
x
Reference in New Issue
Block a user