Skip to content

Bump safety from 3.0.0 to 3.0.1 (#259) #1312

Bump safety from 3.0.0 to 3.0.1 (#259)

Bump safety from 3.0.0 to 3.0.1 (#259) #1312

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
dynamic_tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for dynamic tests
run: |
pip install -r tests/requirements_for_software_tests.txt
- name: Execute unit tests with coverage report [pytest]
run: |
pytest tests/software_tests --cov-report=term-missing --cov=uds -m "not integration and not performance"
- name: Execute integration tests with coverage report [pytest]
run: |
pytest tests/software_tests --cov-report=term-missing --cov=uds -m "integration"
# TODO: uncomment when performance tests are added
# - name: Execute performance tests with coverage report [pytest]
# run: |
# pytest tests/software_tests --cov-report=term-missing --cov=uds -m "performance"
code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for dynamic tests
run: |
pip install -r tests/requirements_for_software_tests.txt
- name: Prepare coverage uploader [CodeCov]
run: |
curl -Os https://app.codecov.io/gh/mdabrowski1990/uds/uploader/linux/codecov
chmod +x codecov
- name: Execute unit tests [pytest]
run: |
pytest tests/software_tests --cov-report=xml --cov=uds -m "not integration and not performance"
- name: Upload unit tests report [CodeCov]
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unit-tests
- name: Execute integration tests [pytest]
run: |
pytest tests/software_tests --cov-report=xml --cov=uds -m "integration"
- name: Upload integration tests report [CodeCov]
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: integration-tests
# TODO: uncomment when performance tests are added
# - name: Execute performance tests [pytest]
# run: |
# pytest tests/software_tests --cov-report=xml --cov=uds -m "performance"
#
# - name: Upload performance tests report [CodeCov]
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: coverage.xml
# flags: performance-tests
static_code_analysis:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"] # TODO: Add "3.12" when stable
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for static tests
run: |
pip install -r tests/requirements_for_static_code_analysis.txt
- name: Execute static code analysis [prospector]
run: |
prospector --profile tests/prospector_profile.yaml uds
dependency_checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install external packages used for dependency scanning
run: |
pip install -r tests/requirements_for_dependency_scanning.txt
- name: Execute dependency scanning [safety]
run: |
safety check -r requirements.txt