mirror of
https://github.com/mandiant/dncil
synced 2026-06-08 15:41:41 +00:00
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
code_style:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout dncil
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
|
with:
|
|
python-version: "3.8"
|
|
- name: Install dependencies
|
|
run: pip install -e .[dev]
|
|
- name: Lint with isort
|
|
run: isort --profile black --length-sort --line-width 120 -c .
|
|
- name: Lint with black
|
|
run: black -l 120 --check .
|
|
- name: Check types with mypy
|
|
run: mypy --config-file .github/mypy/mypy.ini dncil/ scripts/ tests/
|
|
|
|
tests:
|
|
name: Tests in ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
needs: code_style
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
# across all operating systems
|
|
python-version: ["3.8", "3.13"]
|
|
include:
|
|
# on Ubuntu run these as well
|
|
- os: ubuntu-latest
|
|
python-version: "3.9"
|
|
- os: ubuntu-latest
|
|
python-version: "3.10"
|
|
- os: ubuntu-latest
|
|
python-version: "3.11"
|
|
- os: ubuntu-latest
|
|
python-version: "3.12"
|
|
steps:
|
|
- name: Checkout dncil with submodules
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
with:
|
|
submodules: true
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dncil
|
|
run: pip install -e .[dev]
|
|
- name: Run tests
|
|
run: pytest -v tests/
|