2020-11-24 12:27:59 +01:00
|
|
|
name: Python application
|
|
|
|
|
2020-11-30 12:36:28 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2020-11-24 12:27:59 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-02-06 15:39:22 +01:00
|
|
|
python-version: [3.7, 3.8, 3.9]
|
2020-11-24 12:27:59 +01:00
|
|
|
|
|
|
|
steps:
|
2020-11-24 12:32:19 +01:00
|
|
|
|
2020-11-24 12:27:59 +01:00
|
|
|
- uses: actions/checkout@v2
|
2022-02-05 10:19:35 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-11-24 12:32:19 +01:00
|
|
|
|
2020-11-24 12:27:59 +01:00
|
|
|
- name: Set up Python ${{matrix.python-version}}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{matrix.python-version}}
|
|
|
|
|
|
|
|
- name: Install Python dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip poetry
|
2021-12-20 11:44:46 +01:00
|
|
|
poetry install -E fileobjects -E openioc -E virustotal -E docs -E pdfexport -E url -E email -E brotli -vvv
|
2020-11-24 12:27:59 +01:00
|
|
|
|
|
|
|
- name: Test with nosetests
|
|
|
|
run: |
|
2021-12-20 11:18:43 +01:00
|
|
|
poetry run pytest --cov=pymisp tests/test_*.py
|
2020-11-24 12:27:59 +01:00
|
|
|
poetry run mypy tests/testlive_comprehensive.py tests/test_mispevent.py tests/testlive_sync.py pymisp
|
|
|
|
|
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
uses: codecov/codecov-action@v1
|