-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4608 from UniversityOfHelsinkiCS/gha-lint
Create a separate workflow for linting
- Loading branch information
Showing
3 changed files
with
25 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Lint code' | ||
|
||
on: | ||
workflow_call: | ||
inputs: {} | ||
|
||
jobs: | ||
lint_backend_and_frontend: | ||
name: 'Lint backend and frontend' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: 'Install dependencies' | ||
run: npm ci && cd services/frontend && npm ci && cd ../backend && npm ci | ||
- name: 'Create symlink for shared' | ||
run: ln -s $PWD/services/shared $PWD/services/backend/src/shared && ln -s $PWD/services/shared $PWD/services/frontend/src/shared | ||
- name: 'Run Stylelint for CSS files' | ||
run: npm run stylelint "services/frontend/src/**/*.css" | ||
- name: 'Run ESLint for JS files' | ||
run: npm run eslint -- --ext .jsx,.js services --report-unused-disable-directives |
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
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