CI Automated Testing #22
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
name: CI Automated Testing | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "feature/**/**" | |
- "fix/**/**" | |
- "release/v*.*.*" | |
workflow_run: | |
workflows: ["CI Code Quality"] | |
types: | |
- completed | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install package and dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel | |
pip3 install -e .[security,testcov,extra] | |
- name: Test application's vulnerability with bandit | |
run: bandit -c pyproject.toml -r . | |
- name: Test with Pytest-Cov | |
run: | | |
pytest --cov --cov-report xml . | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
flags: anomalytics | |
name: codecov-umbrella | |
verbose: true |