@@ -12,38 +12,35 @@ jobs:
12
12
linter :
13
13
runs-on : ubuntu-latest
14
14
steps :
15
- - uses : actions/checkout@v1
16
-
17
- - name : Set up Python 3.8
18
- uses : actions/setup-python@v1
19
- with :
20
- python-version : 3.8
21
-
22
- - name : Cache dependencies
23
- uses : actions/cache@v1
24
- with :
25
- path : ~/.cache/pypoetry
26
- key : ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
15
+ - uses : actions/checkout@v1
16
+ - name : Set up Python 3.9
17
+ uses : actions/setup-python@v1
18
+ with :
19
+ python-version : 3.9
27
20
28
- - name : Install Python dependencies
29
- run : |
30
- make dependencies
31
- env :
32
- PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
21
+ - name : Cache dependencies
22
+ uses : actions/cache@v1
23
+ with :
24
+ path : ~/.cache/pypoetry
25
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
33
26
34
- - name : Lint with pylint
35
- run : |
36
- make lint
27
+ - name : Install Python dependencies
28
+ run : |
29
+ make dependencies
30
+ env :
31
+ PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
32
+ - name : Lint with pylint
33
+ run : |
34
+ make lint
37
35
38
36
setup :
39
37
runs-on : ubuntu-latest
40
38
steps :
41
39
- uses : actions/checkout@v1
42
-
43
- - name : Set up Python 3.8
40
+ - name : Set up Python 3.9
44
41
uses : actions/setup-python@v1
45
42
with :
46
- python-version : 3.8
43
+ python-version : 3.9
47
44
48
45
- name : Cache dependencies
49
46
uses : actions/cache@v1
@@ -56,38 +53,54 @@ jobs:
56
53
make dependencies
57
54
env :
58
55
PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
59
-
60
- - name : Build the package
56
+ - name : Install as a package
61
57
run : |
62
58
poetry build
63
59
64
60
unit :
65
61
runs-on : ubuntu-latest
62
+ services :
63
+ postgres :
64
+ image : postgres:11
65
+ env :
66
+ POSTGRES_USER : postgres
67
+ POSTGRES_PASSWORD : postgres
68
+ POSTGRES_DB : sample_app
69
+ ports :
70
+ - 5432:5432
71
+ options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
66
72
67
73
steps :
68
74
- uses : actions/checkout@v1
69
75
70
- - name : Set up Python 3.8
76
+ - name : Set up Python 3.9
71
77
uses : actions/setup-python@v1
72
78
with :
73
- python-version : 3.8
79
+ python-version : 3.9
74
80
75
- - name : Install Python dependencies
81
+ - name : Cache dependencies
82
+ uses : actions/cache@v1
83
+ with :
84
+ path : ~/.cache/pypoetry
85
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
86
+
87
+ - name : Install dependencies
76
88
run : |
77
89
make dependencies
78
90
env :
79
91
PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
80
92
81
- - name : Prepare coverage
93
+ - name : Prepare CodeClimate
82
94
run : |
83
95
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
84
96
chmod +x ./cc-test-reporter
85
97
./cc-test-reporter before-build
86
98
87
- - name : Unit test with nose test suite
99
+ - name : Unit test with Django test suite
88
100
run : |
89
101
make unit
90
102
env :
103
+ DATABASE_URL : postgres://postgres:postgres@localhost:5432/sample_app
91
104
LOG_LEVEL : ERROR
92
105
93
106
- name : Report coverage
0 commit comments