-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
1,932 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CVE scan | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cve_scan: | ||
name: CVE scan on dependencies | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
cache: 'pip' | ||
cache-dependency-path: '**/requirements.txt' | ||
- name: Get date | ||
id: get-date | ||
run: | | ||
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" | ||
- name: Get cached database | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/cve-bin-tool | ||
key: ${{ runner.os }}-cve-bin-tool-${{ steps.get-date.outputs.date }} | ||
- name: Install dependencies and cve-bin-tool | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools | ||
python -m pip install --upgrade wheel | ||
pip install . -r doc/requirements.txt | ||
- name: Test to check for CVEs for Python requirements and HTML report dependencies | ||
run: | | ||
pytest test/test_requirements.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tool: ['isort', 'black', 'pyupgrade', 'flake8', 'format_checkers', 'bandit', 'gitlint'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
cache: 'pip' | ||
- name: Install pre-commit | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools | ||
python -m pip install --upgrade pre-commit | ||
pre-commit install | ||
- name: Install cve-bin-tool if needed | ||
if: ${{ matrix.tool == 'format_checkers' }} | ||
run: | | ||
python -m pip install --upgrade wheel | ||
python -m pip install . | ||
- name: Run ${{ matrix.tool }} using pre-commit | ||
if: ${{ matrix.tool != 'gitlint' }} | ||
run: | | ||
pre-commit run ${{ matrix.tool }} --all-files | ||
- name: Run gitlint | ||
if: ${{ github.event_name == 'pull_request' && matrix.tool == 'gitlint' }} | ||
run: | | ||
python -m pip install --upgrade gitlint | ||
gitlint --commits ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} |
Oops, something went wrong.