mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-02-17 07:03:58 +00:00
* Clearly define supported Python versions. Support policy based on author's comment on https://github.com/domainaware/parsedmarc/pull/458#issuecomment-2002516299 #458 * Compile Python 3.6 as Ubuntu latest run against Ubuntu 24.04 which haven't Python3.6 + 20.04 is no longer available https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json * Use latest versions of GH Actions * Silent some technicals GH Actions steps * Elasticsearch / opensearch: use supported versions + align used versions * Delete .github/workflows/python-tests-3.6.yml Drop Python 3.6 test * Update Python 3.6 support status in README --------- Co-authored-by: Sean Whalen <44679+seanthegeek@users.noreply.github.com>
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
name: Python tests
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
elasticsearch:
|
|
image: elasticsearch:8.19.7
|
|
env:
|
|
discovery.type: single-node
|
|
cluster.name: parsedmarc-cluster
|
|
discovery.seed_hosts: elasticsearch
|
|
bootstrap.memory_lock: true
|
|
xpack.security.enabled: false
|
|
xpack.license.self_generated.type: basic
|
|
ports:
|
|
- 9200:9200
|
|
- 9300:9300
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Python 3.6 run on a previous Ubuntu
|
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get -q update
|
|
sudo apt-get -qy install libemail-outlook-message-perl
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install .[build]
|
|
- name: Test building documentation
|
|
run: |
|
|
cd docs
|
|
make html
|
|
- name: Check code style
|
|
run: |
|
|
ruff check .
|
|
- name: Run unit tests
|
|
run: |
|
|
pytest --cov --cov-report=xml tests.py
|
|
- name: Test sample DMARC reports
|
|
run: |
|
|
pip install -e .
|
|
parsedmarc --debug -c ci.ini samples/aggregate/*
|
|
parsedmarc --debug -c ci.ini samples/forensic/*
|
|
- name: Test building packages
|
|
run: |
|
|
hatch build
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|