create monorepo with 6 standalone kestrel packages #328
Workflow file for this run
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: Code Coverage Evaluation on PR | |
on: | |
push: | |
branches: | |
- develop | |
- develop_* | |
paths: | |
- 'packages/*/src/**' | |
pull_request: | |
branches: | |
- develop | |
- develop_* | |
paths: | |
- 'packages/*/src/**' | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
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 and kestrel_datasource_stixbundle | |
working-directory: ./packages/kestrel_core | |
run: pytest -vv --cov-report=xml --cov=kestrel --cov=kestrel_datasource_stixbundle | |
- name: Coverage for kestrel_datasource_stixshifter | |
working-directory: ./packages/kestrel_datasource_stixshifter | |
run: pytest -vv --cov-report=xml --cov=kestrel_datasource_stixshifter | |
- name: Coverage for kestrel_analytics_python | |
working-directory: ./packages/kestrel_analytics_python | |
run: pytest -vv --cov-report=xml --cov=kestrel_analytics_python | |
- 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_datasource_stixshifter/coverage.xml,./packages/kestrel_analytics_python/coverage.xml,./packages/kestrel_jupyter/coverage.xml | |
verbose: true |