Skip to content

fix: env 정보 위치 수정 #13

fix: env 정보 위치 수정

fix: env 정보 위치 수정 #13

Workflow file for this run

name: CI KUA-Django + Postgres Tests
# Controls when the workflow will run
on:
# Allows you to call this workflow within another workflow
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggered based on the git event type
push:
branches: [develop]
pull_request:
branches: [develop]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
working-directory: ./KUA
# Add in environment variables for the entire "build" job
services:
postgres:
image: postgres:13
env:
POSTGRES_DB: ${{ secrets.DB_NAME }}
POSTGRES_USER: ${{ secrets.DB_USER }}
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# If you want to test multiple python version(s)
strategy:
matrix:
python-version: ["3.12"]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -r requirements.txt
working-directory: ${{ env.working-directory }}
# - name: Run Tests
# # Step specific environment variables
# env:
# DEBUG: "0"
# DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
# DB_NAME: ${{ secrets.DB_NAME }}
# DB_USER: ${{ secrets.DB_USER }}
# DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
# DB_HOST: ${{secrets.DB_HOST}} # localhost since postgres service runs on the same host
# DB_PORT: 5432
# EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
# EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
# EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
# run: |
# python manage.py test