Skip to content

Commit 3f4e672

Browse files
chore: initial setup (#2)
1 parent 73e141f commit 3f4e672

33 files changed

+17122
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## API PR Checklist
2+
3+
### Pre-requisites
4+
5+
- [ ] I have gone through the Contributing guidelines for [Submitting a Pull Request (PR)](../../CONTRIBUTING.md#submitting-a-pull-request-pr) and ensured that this is not a duplicate PR.
6+
- [ ] I have performed preliminary testing using the [test suite](../../apps/api/OsmoX.postman_collection.json) to ensure that any existing features are not impacted and any new features are working as expected.
7+
- [ ] I have updated the required [api docs](../../apps/api/docs/) as applicable.
8+
- [ ] I have added/updated test cases to the [test suite](../../apps/api/OsmoX.postman_collection.json) as applicable
9+
10+
### PR Details
11+
12+
PR details have been updated as per the given format (see below)
13+
14+
- [ ] PR title adheres to the format specified in guidelines (e.g., `feat: add admin login endpoint`)
15+
- [ ] Description has been added
16+
- [ ] Related changes have been added (optional)
17+
- [ ] Screenshots have been added (optional)
18+
- [ ] Query request and response examples have been added (as applicable, in case added or updated)
19+
- [ ] Documentation changes have been listed (as applicable)
20+
- [ ] Test suite output is added (as applicable)
21+
- [ ] Pending actions have been added (optional)
22+
- [ ] Any other additional notes have been added (optional)
23+
24+
### Additional Information
25+
26+
- [ ] Appropriate label(s) have been added (`ready for review` should be added if the PR is ready to be reviewed)
27+
- [ ] Assignee(s) and reviewer(s) have been added (optional)
28+
29+
---
30+
31+
**Description:**
32+
33+
Add brief description about the changes made in this PR and their purpose. This section can also include mention to any other PRs or issues if needed.
34+
35+
**Related changes:**
36+
37+
- Add short points about the different changes made within the files in this PR.
38+
39+
**Screenshots:**
40+
41+
Add any screenshots as required.
42+
43+
**Query request and response:**
44+
45+
- Add any query request body, cURL statement and response body for the made change or addition.
46+
47+
**Documentation changes:**
48+
49+
- Add a list of changes made to the API documents with brief descriptions.
50+
51+
**Test suite output:**
52+
53+
- Add the output of the status of different test cases in the testing suite.
54+
55+
**Pending actions:**
56+
57+
- Add list of any pending actions that have or would require to be done in this PR.
58+
59+
**Additional notes:**
60+
61+
- Add list of any additional notes you may want to convey in this PR.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Portal PR Checklist
2+
3+
### Pre-requisites
4+
5+
- [ ] I have gone through the Contributing guidelines for [Submitting a Pull Request (PR)](../../CONTRIBUTING.md#submitting-a-pull-request-pr) and ensured that this is not a duplicate PR.
6+
- [ ] I have performed preliminary testing to ensure that any existing features are not impacted and any new features are working as expected.
7+
8+
### PR Details
9+
10+
PR details have been updated as per the given format (see below)
11+
12+
- [ ] PR title adheres to the format specified in guidelines (e.g., `feat: add admin login page`)
13+
- [ ] Description has been added
14+
- [ ] Related changes have been added (optional)
15+
- [ ] Screenshots have been added (optional)
16+
- [ ] Pending actions have been added (optional)
17+
- [ ] Any other additional notes have been added (optional)
18+
19+
### Additional Information
20+
21+
- [ ] Appropriate label(s) have been added (`ready for review` should be added if the PR is ready to be reviewed)
22+
- [ ] Assignee(s) and reviewer(s) have been added (optional)
23+
24+
---
25+
26+
**Description:**
27+
28+
Add brief description about the changes made in this PR and their purpose. This section can also include mention to any other PRs or issues if needed.
29+
30+
**Related changes:**
31+
32+
- Add short points about the different changes made within the files in this PR.
33+
34+
**Screenshots:**
35+
36+
Add any screenshots as required.
37+
38+
**Pending actions:**
39+
40+
- Add list of any pending actions that have or would require to be done in this PR.
41+
42+
**Additional notes:**
43+
44+
- Add list of any additional notes you may want to convey in this PR.

.github/workflows/frontend.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Standard Angular App Flow
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
lint:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '20'
19+
20+
- name: Install dependencies
21+
run: cd apps/portal && npm install
22+
23+
- name: Run linting
24+
run: cd apps/portal && npm run lint
25+
26+
build:
27+
name: Build
28+
runs-on: ubuntu-latest
29+
needs: lint
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v3
33+
34+
- name: Set up Node.js
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: '20'
38+
39+
- name: Install dependencies
40+
run: cd apps/portal && npm install
41+
42+
- name: Build app
43+
run: cd apps/portal && npm run build:prod

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Main Workflow
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
choose-workflow:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
frontend: ${{ steps.set_frontend.outputs.frontend }}
13+
backend: ${{ steps.set_backend.outputs.backend }}
14+
steps:
15+
- name: Set up Frontend
16+
id: set_frontend
17+
run: echo "::set-output name=frontend::false"
18+
- name: Set up Backend
19+
id: set_backend
20+
run: echo "::set-output name=backend::false"
21+
- name: Check for frontend changes
22+
id: check_frontend_changes
23+
run: |
24+
# Check if there are changes in the frontend folder
25+
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -qE '^apps/portal'; then
26+
echo "::set-output name=frontend::true"
27+
fi
28+
- name: Check for backend changes
29+
id: check_backend_changes
30+
run: |
31+
# Check if there are changes in the backend folder
32+
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -qE '^apps/api'; then
33+
echo "::set-output name=backend::true"
34+
fi
35+
36+
run-workflows:
37+
needs: choose-workflow
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Run Frontend Workflow
41+
if: needs.choose-workflow.outputs.frontend == 'true'
42+
run: echo "Run Frontend Workflow"
43+
# You can replace the echo command with the actual command to trigger the frontend workflow
44+
45+
- name: Run Backend Workflow
46+
if: needs.choose-workflow.outputs.backend == 'true'
47+
run: echo "Run Backend Workflow"
48+
# You can replace the echo command with the actual command to trigger the backend workflow

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# OS
2+
.DS_Store
3+
4+
# IDEs and editors
5+
/.idea
6+
.project
7+
.classpath
8+
.c9/
9+
*.launch
10+
.settings/
11+
*.sublime-workspace
12+
13+
# IDE - VSCode
14+
.vscode/*
15+
!.vscode/settings.json
16+
!.vscode/tasks.json
17+
!.vscode/launch.json
18+
!.vscode/extensions.json

apps/portal/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

0 commit comments

Comments
 (0)