-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.98 KB
/
python_cicd.yml
File metadata and controls
61 lines (51 loc) · 1.98 KB
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
60
61
# Discord bot for the TU Delft Aerospace Engineering Python course
# Copyright (C) 2020 Delft University of Technology
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public
# License along with this program.
# If not, see <https://www.gnu.org/licenses/>.
# This workflow will install Python dependencies, run tests and lint with a
# variety of Python versions For more information see:
name: EduBot CI/CD Pipeline
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Installing Package and Dependencies
# All dependencies have to be specified in setup.cfg!
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Linting/Style Checking with Flake8 (Black, isort, docstrings)
# FIXME: Currently flake8 does not raise any errors due to --exit-zero
run: |
pip install flake8
flake8 . --count --statistics --exit-zero
- name: Unit Testing with Pytest
run: |
pip install pytest
pytest
- name: Checking Code Coverage
run: |
coverage report --fail-under=30
# TODO add deploy job that deploys to Heroku on commits tagged with vX.Y.Z