Skip to content

Merge pull request #519 from opencybersecurityalliance/map_attrs #424

Merge pull request #519 from opencybersecurityalliance/map_attrs

Merge pull request #519 from opencybersecurityalliance/map_attrs #424

Workflow file for this run

name: Code Coverage Evaluation on PR
on:
push:
branches:
- develop
paths:
- 'packages/*/src/**'
pull_request:
branches:
- develop
paths:
- 'packages/*/src/**'
types:
- opened
- reopened
- synchronize
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python Tools
run: pip install --upgrade pip setuptools wheel
- name: Install Pytest
run: pip install pytest pytest-cov
- name: Install kestrel [all packages]
run: make install
- name: Coverage for kestrel_core
working-directory: ./packages/kestrel_core
run: pytest -vv --cov-report=xml --cov=kestrel
- name: Coverage for kestrel_interface_opensearch
working-directory: ./packages/kestrel_interface_opensearch
run: pytest -vv --cov-report=xml --cov=kestrel_interface_opensearch
- name: Coverage for kestrel_interface_sqlalchemy
working-directory: ./packages/kestrel_interface_sqlalchemy
run: pytest -vv --cov-report=xml --cov=kestrel_interface_sqlalchemy
- name: Coverage for kestrel_jupyter
working-directory: ./packages/kestrel_jupyter
run: pytest -vv --cov-report=xml $(ls src | grep -v '.egg-info' | xargs | sed -r 's/^| / --cov=/g')
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
files: ./packages/kestrel_core/coverage.xml,./packages/kestrel_interface_opensearch/coverage.xml,./packages/kestrel_interface_sqlalchemy/coverage.xml,./packages/kestrel_jupyter/coverage.xml
verbose: true