-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.61 KB
/
Copy pathpython-package.yml
File metadata and controls
70 lines (58 loc) · 1.61 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
62
63
64
65
66
67
68
69
70
# This workflow will install the package and dependencies, run tests and lint with a single version of Python
name: Python package build and test
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint with flake8
if: always()
run: |
flake8 .
- name: Lint with black
if: always()
run: |
black --version
black --check .
- name: Run Bandit tests
if: always()
run: |
bandit -c "bandit.yml" -r test-aide -f html -o bandit-test-results.html
- name: Upload bandit test results
if: always()
uses: actions/upload-artifact@v2
with:
name: bandit-results
path: bandit-test-results.html
- name: Test with pytest
if: always()
run: |
pytest . --cov=test_aide/ --cov-report=html --cov-config=.coveragerc
- name: Upload coverage pytest html test results to github
if: always()
uses: actions/upload-artifact@v2
with:
name: coverage-html-pytest-results
path: htmlcov
- name: Remove pandas and numpy
if: always()
run: |
pip uninstall pandas -y
pip uninstall numpy -y
- name: Test with pytest without pandas or numpy
if: always()
run: |
pytest .