File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ pull_request :
4+ types : [opened, synchronize]
5+ jobs :
6+ unit_tests :
7+ runs-on : ubuntu-latest
8+
9+ services :
10+ # Label used to access the service container
11+ postgres :
12+ image : postgres
13+ env :
14+ POSTGRES_PASSWORD : vulnerablecode
15+ POSTGRES_DB : vulnerablecode
16+ # Set health checks to wait until postgres has started
17+ options : >-
18+ --health-cmd pg_isready
19+ --health-interval 10s
20+ --health-timeout 5s
21+ --health-retries 5
22+ ports :
23+ # Maps tcp port 5432 on service container to the host
24+ - 5432:5432
25+ steps :
26+ - name : Check out repository code
27+ uses : actions/checkout@v2
28+
29+ - name : Set up Python 3.8
30+ uses : actions/setup-python@v2
31+ with :
32+ python-version : 3.8
33+
34+ - name : Install dependencies
35+ run : |
36+ sudo apt install python3-dev postgresql libpq-dev build-essential libxml2-dev libxslt1-dev
37+ python -m pip install --upgrade pip
38+ pip install -r requirements.txt
39+
40+ - name : Run tests
41+ run : pytest
42+ env :
43+ # The hostname, username used to communicate with the PostgreSQL service container
44+ POSTGRES_HOST : localhost
45+ VC_DB_USER : postgres
46+ POSTGRES_PORT : 5432
47+ DJANGO_DEV : 1
48+ GH_TOKEN : 1
Original file line number Diff line number Diff line change @@ -28,4 +28,4 @@ notifications:
2828 - https://webhooks.gitter.im/e/b119fa557626081e1f36
2929 on_success : change # options: [always|never|change] default: always
3030 on_failure : always # options: [always|never|change] default: always
31- on_start : never # options: [always|never|change] default: always
31+ on_start : never # options: [always|never|change] default: always
You can’t perform that action at this time.
0 commit comments