-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI, tooling and autofixes for frontend
- Loading branch information
1 parent
2cf09b7
commit da5f981
Showing
30 changed files
with
8,817 additions
and
3,308 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
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,35 @@ | ||
name: canopeum_frontend | ||
|
||
on: | ||
push: | ||
paths: | ||
- "canopeum_frontend/**" | ||
- ".github/workflows/canopeum_frontend.yml" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "canopeum_frontend/**" | ||
- ".github/workflows/canopeum_frontend.yml" | ||
|
||
jobs: | ||
Lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: canopeum_frontend | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- run: npm ci | ||
- run: npm run lint | ||
Build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: canopeum_frontend | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- run: npm ci | ||
- run: npm run build |
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ repos: | |
- id: check-toml | ||
- id: check-merge-conflict | ||
- id: check-case-conflict | ||
# You can run this locally with `ruff format && ruff check` | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.4 # must match canopeum_backend/requirements-dev.txt | ||
hooks: | ||
|
@@ -20,6 +21,24 @@ repos: | |
args: [--fix] | ||
# Run the formatter. | ||
- id: ruff-format | ||
# You can run this locally with `npm run lint:fix` | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v8.56.0 | ||
hooks: | ||
- id: eslint | ||
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx | ||
types: [file] | ||
additional_dependencies: [ | ||
# Keep these in sync with canopeum_backend/package.json | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
] | ||
|
||
ci: | ||
autoupdate_schedule: quarterly |
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
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 |
---|---|---|
|
@@ -10,25 +10,31 @@ Follow these instructions to get the project up and running on your local machin | |
|
||
### Prerequisites | ||
|
||
For frontend | ||
For frontend: | ||
|
||
- [Node.js](https://nodejs.org/en/download) (includes npm) | ||
- [Mockoon](https://mockoon.com/download/#download-section) | ||
|
||
- Node.js | ||
- npm (Node Package Manager) | ||
- Mockoon | ||
For backend | ||
- Python 3.12 | ||
- Docker | ||
|
||
- [Python 3.12](https://www.python.org/downloads/) | ||
- [Docker](https://www.docker.com/get-started/) | ||
|
||
### Installation | ||
|
||
1. Clone the repository: | ||
1. Fork the project: | ||
![Fork](/docs/Fork.png) | ||
|
||
2. Clone the repository: | ||
From your fork, copy the repo's URL | ||
![Clone](/docs/Clone.png) | ||
|
||
```shell | ||
git clone [email protected]:BesLogic/releaf-canopeum.git | ||
git clone <the_url_you_copied> | ||
cd releaf-canopeum | ||
``` | ||
|
||
2. Set up a Python 3.12 virtual environment | ||
3. Set up a Python 3.12 virtual environment | ||
|
||
```shell | ||
cd canopeum_backend | ||
|
@@ -58,7 +64,7 @@ In VSCode (Windows): | |
`CTRL+Shift+P` (Open Command Palette) > `Python: Select Interpreter` | ||
![VSCode_select_venv](/docs/VSCode_select_venv.png) | ||
|
||
3. Set up Django backend and Database: (Skip this section for Frontend only) | ||
4. Set up Django backend and Database: (Skip this section for Frontend only) | ||
|
||
```shell | ||
docker compose up | ||
|
@@ -68,7 +74,7 @@ python manage.py migrate | |
python manage.py runserver | ||
``` | ||
|
||
4. Set up React frontend: | ||
5. Set up React frontend: | ||
|
||
```shell | ||
cd canopeum_frontend | ||
|
Oops, something went wrong.