Debian Codegraph @

.github/workflows/main.yml

raw
1 name: MAIN
2
3 # Run on push only for main
4 # Otherwise it may trigger concurrently `push & pull_request` on PRs.
5 on:
6 push:
7 branches:
8 - master
9
10 jobs:
11 build:
12 name: Python ${{ matrix.python-version }}, django ${{ matrix.django-version }}
13 runs-on: ubuntu-latest
14 strategy:
15 matrix:
16 python-version: [3.6, 3.7, 3.8, 3.9, "3.10", pypy3]
17 django-version: [2.2, 3.0, 3.1, 3.2, 4.0]
18 exclude:
19 # excludes list
20 - python-version: 3.6
21 django-version: 4.0
22 - python-version: 3.7
23 django-version: 4.0
24 - python-version: pypy3
25 django-version: 4.0
26 steps:
27 - uses: actions/checkout@v2
28 - name: setup python
29 uses: actions/setup-python@v2
30 with:
31 python-version: ${{ matrix.python-version }}
32 - name: Install dependencies
33 run: |
34 python -m pip install --upgrade pip
35 pip install -e .
36 pip install coveralls
37 pip install "django~=${{ matrix.django-version }}.0"
38 - name: Run flake8
39 run: |
40 pip install flake8
41 flake8 --exclude=migrations,tests --ignore=E501,E241,E225,E128 .
42 - name: Run pycodestyle
43 run: |
44 pip install pycodestyle
45 pycodestyle --exclude=migrations,tests --ignore=E501,E241,E225,E128 .
46 - name: Run test
47 run: |
48 coverage run --source=ipware manage.py test
49 - name: Coveralls
50 run: coveralls --service=github
51 env:
52 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}