Skip to content

Commit

Permalink
[CI] added safety checks
Browse files Browse the repository at this point in the history
  • Loading branch information
maxisoft committed Sep 1, 2020
1 parent 495ff62 commit 1960291
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/safety.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check installed dependencies for known security vulnerabilities

on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]

jobs:
safety:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Setup pip cache
uses: actions/cache@v2
timeout-minutes: 5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install deps
run: |
pip install -r test-requirements.txt &&
pip install safety &&
pip install -e .
timeout-minutes: 3

- name: Run safety
run: python -m safety check
timeout-minutes: 20

0 comments on commit 1960291

Please sign in to comment.