Skip to content

Commit

Permalink
Merge branch 'main' into feat/259_argument_reports_suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
purple-void committed Aug 13, 2024
2 parents d2e99b5 + 8279015 commit fc40516
Show file tree
Hide file tree
Showing 49 changed files with 4,232 additions and 173 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/decision.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Decision
about: To open a discussion and documentation for a key decision about the project's
about:
To open a discussion and documentation for a key decision about the project's
repository.
title: Decide on <TOPIC>
labels: decision
assignees: ''

---

- **Impact**:
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Add a default Issue
title: ''
labels: ''
assignees: ''

---

## Problem
Expand Down
88 changes: 44 additions & 44 deletions .github/workflows/backend_ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Backend CI
on:
on:
push:
branches: ['main']
paths: ['backend/**']
Expand All @@ -11,59 +11,59 @@ jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
run:
working-directory: ./backend

strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- '3.10'
- '3.11'
- '3.12'

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Write dummy .env
run: |
cp .template-env .env
sed -i 's/^DJANGO_SECRET_KEY=$/DJANGO_SECRET_KEY=abc123/' .env
sed -i 's/^EMAIL_PORT=$/EMAIL_PORT=587/' .env
sed -i 's/^DJANGO_SECURE_HSTS_SECONDS=$/DJANGO_SECURE_HSTS_SECONDS=60/' .env
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run ruff
run: |
ruff check .
- name: Write dummy .env
run: |
cp .template-env .env
sed -i 's/^DJANGO_SECRET_KEY=$/DJANGO_SECRET_KEY=abc123/' .env
sed -i 's/^EMAIL_PORT=$/EMAIL_PORT=587/' .env
sed -i 's/^DJANGO_SECURE_HSTS_SECONDS=$/DJANGO_SECURE_HSTS_SECONDS=60/' .env
- name: Run tests
run: pytest --junit-xml report.xml
- name: Run ruff
run: |
ruff check .
- name: Generate OpenAPI
run: python manage.py spectacular --file schema.yml
- name: Run tests
run: pytest --junit-xml report.xml

- name: Upload OpenAPI Schema
if: ${{ matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v4
with:
name: schema
path: backend/schema.yml
if-no-files-found: error

- name: Upload Backend Test Results
if: ${{ matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v4
with:
name: report
path: backend/report.xml
if-no-files-found: error
- name: Generate OpenAPI
run: python manage.py spectacular --file schema.yml

- name: Upload OpenAPI Schema
if: ${{ matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v4
with:
name: schema
path: backend/schema.yml
if-no-files-found: error

- name: Upload Backend Test Results
if: ${{ matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v4
with:
name: report
path: backend/report.xml
if-no-files-found: error
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# No package should be installed in the root directory
package-lock.json
package.json
./package-lock.json
./package.json

# Python
.venv
Expand Down
15 changes: 14 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,27 @@ repos:
"
stages: [pre-commit]
# Apply to all files in the frontend directory
files: 'frontend/.*'
# files: 'frontend/.*'
args:
[
# ⚠️ If you modify any of these values
# make sure to update the .prettierrc file as well
# to keep the configuration consistent ⚠️
'--tab-width',
'2',
'--single-quote',
'--no-semi',
'--jsx-single-quote',
'--print-width',
'82',
'--arrow-parens',
'always',
'--bracket-spacing',
'true',
'--end-of-line',
'lf',
'--bracket-same-line',
'false',
'--quote-props',
'consistent',
]
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Backend is ignored by prettier as we use ruff for formatting & linting the backend code
/backend
# Yaml files are ignored because prettier errors on them are :poop:
*.yaml
14 changes: 14 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# ⚠️ If you modify any of these values make sure to
# update the prettier hook config in .pre-commit-config.yaml as well
# to keep the configuration consistent ⚠️
tabWidth: 2
singleQuote: true
semi: false
jsxSingleQuote: true
printWidth: 82
arrowParens: always
bracketSpacing: true
endOfLine: lf
bracketSameLine: false
quoteProps: consistent
7 changes: 7 additions & 0 deletions backend-mock/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea/
.vscode/
node_modules/
build/
tmp/
temp/
database-mock.sqlite
7 changes: 7 additions & 0 deletions backend-mock/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Awesome Project Build with TypeORM

Steps to run this project:

1. Run `npm i` command
2. Setup database settings inside `data-source.ts` file
3. Run `npm start` command
Loading

0 comments on commit fc40516

Please sign in to comment.