-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (50 loc) · 1.4 KB
/
code-compliance.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
55
56
57
58
name: Code Compliance
on:
pull_request:
push:
branches: [main, dev]
workflow_dispatch:
jobs:
code-compliance:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: tradero
POSTGRES_HOST_AUTH_METHOD: trust
POSTRGRES_DB: test_tradero
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- run: pipenv install --dev
- run: pipenv run pip install -e git+https://github.com/math-a3k/django-ai.git@tradero#egg=django_ai
- name: pre-commit
uses: pre-commit/action@v3.0.0
- name: Testing and Coverage
run: pipenv run pytest -v