🚑Hotfix: serializers 변경 #107
Workflow file for this run
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
name: Django Ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
ci: | |
runs-on: ubuntu-20.04 | |
env: | |
RDS_HOSTNAME: ${{ secrets.RDS_HOSTNAME }} | |
RDS_DB_NAME: ${{ secrets.RDS_DB_NAME }} | |
RDS_USERNAME: ${{ secrets.RDS_USERNAME }} | |
RDS_PASSWORD: ${{ secrets.RDS_PASSWORD }} | |
RDS_DB_PORT: ${{ secrets.RDS_DB_PORT }} | |
services: | |
redis: | |
image: redis:7.0 | |
ports: | |
- 6379:6379 | |
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Check out the codes | |
uses: actions/checkout@v2 | |
- name: Setup python environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12.1 | |
- name: Set timezone to KST | |
run: | | |
sudo rm /etc/localtime | |
sudo ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
poetry install --no-root | |
- name: Migrate Database | |
run: | | |
poetry run python src/manage.py migrate --noinput | |
- name: Run black | |
run: | | |
poetry run black . --check | |
- name: Run isort | |
run: | | |
poetry run isort . --check --diff | |
- name: Test python project | |
run: | | |
poetry run coverage run src/manage.py test | |
poetry run coverage report -m | |