-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.16 KB
/
ci.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
env:
SECRET_KEY: "SK"
ALLOWED_HOSTS: "*,"
DJANGO_SETTINGS_MODULE: "nexus.settings"
jobs:
container-job:
runs-on: ubuntu-latest
container: python:3.10-slim
services:
postgres:
image: postgres:16
env:
DEFAULT_DATABASE: postgres://nexus:nexus@postgres:5432/nexus
POSTGRES_HOST: postgres
POSTGRES_USER: nexus
POSTGRES_DATABASE: nexus
POSTGRES_PASSWORD: nexus
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup Python
run: |
pip install poetry
poetry config virtualenvs.create false --local
poetry install
python contrib/gen_env.py
- name: Run Django Unittests with Coverage
run: coverage run manage.py test --verbosity=2 --noinput
- name: Coverage Report
run: coverage report
- name: Flake8
run: flake8 nexus/