Added some CI
This commit is contained in:
45
.github/workflows/black.yml
vendored
Normal file
45
.github/workflows/black.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Black
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- Development
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 1. Check out code
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# 2. Set up Python
|
||||||
|
- name: Set up Python 3.9
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
|
||||||
|
# 3. Install dependencies
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install black isort flake8 pylint pytest python-dotenv
|
||||||
|
|
||||||
|
# 4. Run code format checks
|
||||||
|
- name: Check code formatting with Black
|
||||||
|
run: black --check .
|
||||||
|
|
||||||
|
#- name: Check import order with isort
|
||||||
|
# run: isort --check-only .
|
||||||
|
|
||||||
|
# 5. Run linters
|
||||||
|
#- name: Run flake8
|
||||||
|
# run: flake8
|
||||||
|
|
||||||
|
#- name: Run pylint
|
||||||
|
# run: pylint frontend services utils
|
||||||
|
|
||||||
|
# 6. Run unit tests
|
||||||
|
#- name: Run pytest
|
||||||
|
# run: pytest
|
||||||
31
.github/workflows/isort.yml
vendored
Normal file
31
.github/workflows/isort.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: Isort
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- Development
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 1. Check out code
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# 2. Set up Python
|
||||||
|
- name: Set up Python 3.9
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
|
||||||
|
# 3. Install dependencies
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install isort
|
||||||
|
|
||||||
|
# 4. Run code format checks
|
||||||
|
- name: Check import order with isort
|
||||||
|
run: isort --check-only .
|
||||||
31
.github/workflows/unit-test.yml
vendored
Normal file
31
.github/workflows/unit-test.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: Unit Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- Development
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 1. Check out code
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# 2. Set up Python
|
||||||
|
- name: Set up Python 3.9
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
|
||||||
|
# 3. Install dependencies
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pytest python-dotenv
|
||||||
|
|
||||||
|
# 6. Run unit tests
|
||||||
|
- name: Run pytest
|
||||||
|
run: pytest
|
||||||
Reference in New Issue
Block a user