Skip to content

Commit

Permalink
feat(backend): add lint and build workflow and rename core (bsoc-bitb…
Browse files Browse the repository at this point in the history
…yte#44)

* feat(backend): add lint and  build workflow and rename core

* change file structure

* fix(backend): minor fixes
  • Loading branch information
arminpatel authored Jul 4, 2023
1 parent d86dcbb commit 9990497
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/api-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: API Tests

on:
push:
branches: [ develop ]
paths:
- backend/**
- .github/workflows/api-build.yml
pull_request:
branches: [ develop ]
paths:
- backend/**
- .github/workflows/api-build.yml

env:
DJANGO_SECRET: random-key

defaults:
run:
shell: bash
working-directory: backend

jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
pytest --cache-clear
flake8-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
max-line-length: "100"
path: "backend"
1 change: 1 addition & 0 deletions backend/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DJANGO_SECRET=
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file removed core/.env.template
Empty file.
Empty file removed core/settings.py
Empty file.

0 comments on commit 9990497

Please sign in to comment.