From 1960291be833486cc1bbb4b09970d628af9507e6 Mon Sep 17 00:00:00 2001 From: maxisoft Date: Tue, 1 Sep 2020 21:30:15 +0200 Subject: [PATCH] [CI] added safety checks --- .github/workflows/safety.yml | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/safety.yml diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml new file mode 100644 index 0000000..d021a17 --- /dev/null +++ b/.github/workflows/safety.yml @@ -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 + \ No newline at end of file