-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add code linting and formatting workflow (#12)
* ci: add code linting and formatting workflow * fix node cache dependency path * install pipenv * specify node v20 to try to suppress warning
- Loading branch information
1 parent
06fc9df
commit 1563cbd
Showing
2 changed files
with
55 additions
and
0 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,49 @@ | ||
name: Formatting and Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Python setup | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: pipenv | ||
cache-dependency-path: app/backend/Pipfile.lock | ||
|
||
- name: Install pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Node setup and cache | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
cache-dependency-path: app/frontend/pnpm-lock.yaml | ||
|
||
- name: Install development dependencies | ||
run: cd app && make devinstall | ||
|
||
- name: Check code formatting and linting | ||
run: cd app && make devlintcheck |
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