Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

license + vulnerability tests #78

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +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:
- name: Checkout from runner repo
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
if: github.event_name != 'pull_request'
- name: Checkout from PR origin repo
uses: actions/checkout@v2
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
if: github.event_name == 'pull_request'
- 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/gh-action-pip-audit@v1.0.0
27 changes: 14 additions & 13 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@ on:
pull_request:
branches:
- dev
paths:
- 'requirements/**'
- 'setup.py'
workflow_dispatch:

jobs:
license_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -32,12 +27,18 @@ jobs:
- 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/action-pip-license-checker@v0.5.0
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 }}"
53 changes: 0 additions & 53 deletions test/license_tests.py

This file was deleted.