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:
|
2023-04-19 10:00:13 +02:00
|
|
|
fail-fast: false
|
2020-11-24 12:27:59 +01:00
|
|
|
matrix:
|
2024-01-22 10:34:14 +01:00
|
|
|
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
|
2020-11-24 12:27:59 +01:00
|
|
|
|
|
|
|
steps:
|
2020-11-24 12:32:19 +01:00
|
|
|
|
2023-09-04 18:12:52 +02:00
|
|
|
- uses: actions/checkout@v4
|
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}}
|
2023-12-06 17:10:15 +01:00
|
|
|
uses: actions/setup-python@v5
|
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
|
2024-01-30 13:33:38 +01:00
|
|
|
poetry run mypy .
|
2020-11-24 12:27:59 +01:00
|
|
|
|
2024-01-05 21:18:44 +01:00
|
|
|
- name: Test with nosetests with orjson
|
|
|
|
run: |
|
|
|
|
pip3 install orjson
|
|
|
|
poetry run pytest --cov=pymisp tests/test_*.py
|
|
|
|
|
2020-11-24 12:27:59 +01:00
|
|
|
- name: Upload coverage to Codecov
|
2024-02-01 17:52:24 +01:00
|
|
|
uses: codecov/codecov-action@v4
|