-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1 KB
/
django.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
environment: DEV_ENV
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@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python -
- name: Set Environment Variables
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
STATIC_ROOT: ${{ secrets.STATIC_ROOT }}
run: |
echo "SECRET_KEY=${SECRET_KEY}" > ./envs/.env
echo "STATIC_ROOT=${STATIC_ROOT}" >> ./envs/.env
- name: Install Dependencies
run: poetry install
- name: Collect Static Files
run: poetry run python manage.py collectstatic --no-input
- name: Run Tests
run: poetry run python manage.py test