fix: requirements.txt to reduce vulnerabilities #55
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Pytest and code coverage | |
on: [push] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest coverage | |
pip install -r requirements.txt | |
- name: Test with pytest and report code coverage | |
run: | | |
coverage run -m --source=federa -p test.unittest.test_algorithms | |
coverage run -m --source=federa -p test.unittest.test_datasets | |
coverage run -m --source=federa -p test.unittest.test_modules | |
coverage run -m --source=federa -p test.unittest.test_models | |
coverage combine | |
continue-on-error: true | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Run Bandit | |
run: | | |
bandit -r --ini .bandit | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@v2 |