-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.51 KB
/
pythonapp.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: APD Aggregation
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: apd
POSTGRES_DB: apd-test
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipenv
pipenv sync --dev
- name: Lint with flake8
run: |
pipenv run pip install flake8~=${{ matrix.python-version }}
pipenv run flake8 . --count --show-source --statistics
- name: Lint with black
run: |
pipenv run black --check .
- name: Lint with mypy
run: |
pipenv run mypy --namespace-packages -p apd.aggregation
- name: Test with pytest
run: |
pipenv run pytest