PyMISP/.github/workflows/pytest.yml

46 lines
1.0 KiB
YAML
Raw Normal View History

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:
- uses: actions/checkout@v4
2022-02-05 10:19:35 +01:00
with:
submodules: recursive
2020-11-24 12:27:59 +01:00
- name: Set up Python ${{matrix.python-version}}
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
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
- 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
uses: codecov/codecov-action@v4