-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
354 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
static-analysis: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out the codes | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python environment | ||
id: setup-python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Cache Poetry | ||
id: cache-poetry | ||
uses: actions/cache@v2 | ||
with: | ||
key: poetry-1.4.2 | ||
path: ~/.local/ | ||
|
||
- name: Install Poetry | ||
if: steps.cache-poetry.outputs.cache-hit != 'true' | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2 | ||
- name: Register Poetry bin | ||
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH | ||
|
||
- name: Cache dependencies | ||
id: cache-venv | ||
uses: actions/cache@v2 | ||
with: | ||
key: python-${{ steps.setup-python.outputs.python-version }}-poetry-lock-${{ hashFiles('poetry.lock') }}-toml-${{ hashFiles('pyproject.toml') }}-poetry-1.4.2 | ||
path: /home/runner/.cache/pypoetry/virtualenvs/ | ||
|
||
- name: Install dependencies | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: poetry install | ||
|
||
- name: Run Black | ||
run: poetry run black . --check | ||
|
||
- name: Run Isort | ||
run: poetry run isort . --check --diff | ||
|
||
- name: Run Mypy | ||
run: poetry run mypy . | ||
|
||
- name: Run Toml Sort | ||
run: poetry run toml-sort pyproject.toml --all --check | ||
|
||
test: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
LOG_LEVEL: DEBUG | ||
|
||
steps: | ||
|
||
- name: Set timezone to KST | ||
run: | | ||
sudo rm /etc/localtime | ||
sudo ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime | ||
- name: Check out the codes | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python environment | ||
id: setup-python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Cache Poetry | ||
id: cache-poetry | ||
uses: actions/cache@v2 | ||
with: | ||
key: poetry-1.4.2 | ||
path: ~/.local/ | ||
|
||
- name: Install Poetry | ||
if: steps.cache-poetry.outputs.cache-hit != 'true' | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2 | ||
- name: Register Poetry bin | ||
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH | ||
|
||
- name: Cache dependencies | ||
id: cache-venv | ||
uses: actions/cache@v2 | ||
with: | ||
key: python-${{ steps.setup-python.outputs.python-version }}-poetry-lock-${{ hashFiles('poetry.lock') }}-toml-${{ hashFiles('pyproject.toml') }} | ||
path: /home/runner/.cache/pypoetry/virtualenvs/ | ||
|
||
- name: Install dependencies | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: poetry install | ||
|
||
- name: Run Pytest | ||
run: | | ||
poetry run coverage run -m pytest --asyncio-mode=auto | ||
poetry run coverage report -m | ||
poetry run coverage html |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class UserappConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "userapp" |
Empty file.
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,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,3 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
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
Empty file.
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
Empty file.
Empty file.
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
Oops, something went wrong.