Skip to content

Commit 12ec4f8

Browse files
authored
license + vulnerability tests (MycroftAI#31)
1 parent 0d19598 commit 12ec4f8

File tree

3 files changed

+31
-65
lines changed

3 files changed

+31
-65
lines changed

.github/workflows/build_tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,31 @@ on:
2121

2222
jobs:
2323
build_tests:
24+
strategy:
25+
max-parallel: 2
26+
matrix:
27+
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
2428
runs-on: ubuntu-latest
2529
steps:
2630
- uses: actions/checkout@v2
2731
- name: Setup Python
2832
uses: actions/setup-python@v1
2933
with:
30-
python-version: 3.8
34+
python-version: ${{ matrix.python-version }}
3135
- name: Install Build Tools
3236
run: |
3337
python -m pip install build wheel
38+
- name: Install System Dependencies
39+
run: |
40+
sudo apt-get update
41+
sudo apt install python3-dev swig libssl-dev
42+
- name: Build Source Packages
43+
run: |
44+
python setup.py sdist
3445
- name: Build Distribution Packages
3546
run: |
3647
python setup.py bdist_wheel
3748
- name: Install package
3849
run: |
3950
pip install .
51+
- uses: pypa/[email protected]

.github/workflows/license_tests.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
pull_request:
77
branches:
88
- dev
9-
paths:
10-
- 'requirements/**'
11-
- 'setup.py'
129
workflow_dispatch:
1310

1411
jobs:
@@ -23,15 +20,25 @@ jobs:
2320
- name: Install Build Tools
2421
run: |
2522
python -m pip install build wheel
23+
- name: Install System Dependencies
24+
run: |
25+
sudo apt-get update
26+
sudo apt install python3-dev swig libssl-dev
2627
- name: Install core repo
2728
run: |
2829
pip install .
29-
- name: Install licheck
30-
run: |
31-
pip install git+https://github.com/NeonJarbas/lichecker
32-
- name: Install test dependencies
30+
- name: Get explicit and transitive dependencies
3331
run: |
34-
pip install pytest pytest-timeout pytest-cov
35-
- name: Test Licenses
36-
run: |
37-
pytest test/license_tests.py
32+
pip freeze > requirements-all.txt
33+
- name: Check python
34+
id: license_check_report
35+
uses: pilosus/[email protected]
36+
with:
37+
requirements: 'requirements-all.txt'
38+
fail: 'Copyleft,Other,Error'
39+
fails-only: true
40+
exclude: '^(tqdm).*'
41+
exclude-license: '^(Mozilla).*$'
42+
- name: Print report
43+
if: ${{ always() }}
44+
run: echo "${{ steps.license_check_report.outputs.report }}"

test/license_tests.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)