Skip to content

Commit

Permalink
license + vulnerability tests (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Oct 18, 2022
1 parent 55d2cde commit 4c061bf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 72 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,31 @@ on:

jobs:
build_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
- name: Build Source Packages
run: |
python setup.py sdist
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Install package
run: |
pip install .
pip install .[all]
- uses: pypa/[email protected]
29 changes: 18 additions & 11 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches:
- dev
paths:
- 'requirements/**'
- 'setup.py'
workflow_dispatch:

jobs:
Expand All @@ -23,15 +20,25 @@ jobs:
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
- name: Install core repo
run: |
pip install .
- name: Install licheck
run: |
pip install git+https://github.com/NeonJarbas/lichecker
- name: Install test dependencies
- name: Get explicit and transitive dependencies
run: |
pip install pytest pytest-timeout pytest-cov
- name: Test Licenses
run: |
pytest test/license_tests.py
pip freeze > requirements-all.txt
- name: Check python
id: license_check_report
uses: pilosus/[email protected]
with:
requirements: 'requirements-all.txt'
fail: 'Copyleft,Other,Error'
fails-only: true
exclude: '^(tqdm).*'
exclude-license: '^(Mozilla).*$'
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
59 changes: 0 additions & 59 deletions test/license_tests.py

This file was deleted.

0 comments on commit 4c061bf

Please sign in to comment.