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:
|
2023-01-07 14:13:32 +01:00
|
|
|
python-version: [3.8, 3.9, '3.10', '3.11']
|
2020-11-24 12:27:59 +01:00
|
|
|
|
|
|
|
steps:
|
2020-11-24 12:32:19 +01:00
|
|
|
|
2022-10-03 00:58:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
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}}
|
2022-10-03 00:58:54 +02:00
|
|
|
uses: actions/setup-python@v4
|
2020-11-24 12:27:59 +01:00
|
|
|
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
|
2022-10-03 00:58:49 +02:00
|
|
|
uses: codecov/codecov-action@v3
|