-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (56 loc) · 1.86 KB
/
github-actions.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
59
60
61
on: push
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: github_actions
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: python ldap
run: sudo apt-get install libsasl2-dev python3-dev libldap2-dev libssl-dev #adding package for python ldap error
- name: Install dependencies
run: |
pip install --upgrade pip
python -m pip install python-ldap
#pip install --upgrade pip setuptools wheel
#pip install pip==19.3.1
#pip install --force-reinstall 'setuptools<58.0.0'
#pip install -r requirements.txt
#pip install -r requirements-toil.txt
pip install -r requirements-dev.txt
#python manage.py migrate
- name: Run migrations
run: python manage.py migrate
env:
BEAGLE_DB_NAME: github_actions
BEAGLE_DB_PASSWORD: postgres
BEAGLE_DB_USERNAME: postgres
- name: Run test
#run: python manage.py test
run: |
python manage.py test
env:
BEAGLE_DB_NAME: github_actions
BEAGLE_DB_PASSWORD: postgres
BEAGLE_DB_USERNAME: postgres
#- name: Run flake8
#uses: suo/flake8-github-action@releases/v1
#with:
#checkName: 'build' # NOTE: this needs to be the same as the job name
#env:
#BEAGLE_DB_NAME: github_actions
#BEAGLE_DB_PASSWORD: postgres
#BEAGLE_DB_USERNAME: postgres