-
Notifications
You must be signed in to change notification settings - Fork 335
47 lines (46 loc) · 1.29 KB
/
ci.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
name: Actions CI
on:
pull_request: {}
push:
branches:
- master
- release-3-2-0
tags:
- 'v*.*.*'
jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- 3.7
task:
- name: Lint
command: |
./tests/scripts/pylint.sh
- name: Test
command: |
./tests/scripts/unit_tests.sh
./manage.py test rules
./manage.py test classifier
- name: Docs
command: |
sphinx-build -W docs/source docs/build
- name: Bandit
command: |
bandit --ini setup.cfg -r .
name: "Python ${{ matrix.python }}/${{ matrix.task.name }}"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v1"
with:
python-version: ${{ matrix.python }}
- name: Install requirements
run: pip install -r requirements.txt
- name: ${{ matrix.task.name }}
run: ${{ matrix.task.command }}
- name: Submit Coverage
run: ([ -z "$COVERALLS_REPO_TOKEN" ] && echo "coveralls is skipped in forked repo tests" || coveralls)
if: matrix.task.name == 'Test'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}