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 : pull_request
3+ jobs :
4+ unit_tests :
5+ runs-on : ubuntu-latest
6+
7+ services :
8+ # Label used to access the service container
9+ postgres :
10+ image : postgres
11+ env :
12+ POSTGRES_PASSWORD : vulnerablecode
13+ POSTGRES_DB : vulnerablecode
14+ # Set health checks to wait until postgres has started
15+ options : >-
16+ --health-cmd pg_isready
17+ --health-interval 10s
18+ --health-timeout 5s
19+ --health-retries 5
20+ ports :
21+ # Maps tcp port 5432 on service container to the host
22+ - 5432:5432
23+ steps :
24+ - name : Check out repository code
25+ uses : actions/checkout@v2
26+
27+ - name : Set up Python 3.8
28+ uses : actions/setup-python@v2
29+ with :
30+ python-version : 3.8
31+
32+ - name : Install dependencies
33+ run : |
34+ sudo apt install python3-dev postgresql libpq-dev build-essential libxml2-dev libxslt1-dev
35+ python -m pip install --upgrade pip
36+ pip install -r requirements.txt
37+
38+ - name : Run tests
39+ run : pytest
40+ env :
41+ # The hostname, username used to communicate with the PostgreSQL service container
42+ POSTGRES_HOST : localhost
43+ VC_DB_USER : postgres
44+ POSTGRES_PORT : 5432
45+ DJANGO_DEV : 1
46+ GH_TOKEN : 1
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments