2020-06-26 18:31:58 +09:30
|
|
|
name: testing
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-10-19 18:31:38 +10:30
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 3.0
|
2020-06-26 18:31:58 +09:30
|
|
|
pull_request:
|
2020-10-19 18:31:38 +10:30
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 3.0
|
2020-06-26 18:31:58 +09:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2024-10-19 16:07:53 +10:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-10-19 19:25:32 +10:30
|
|
|
|
2020-06-26 18:31:58 +09:30
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-10-19 16:23:46 +10:00
|
|
|
os: ["ubuntu-latest"]
|
2024-12-30 15:36:40 +07:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
2024-10-19 17:13:13 +10:00
|
|
|
#include:
|
2024-10-19 16:12:06 +10:00
|
|
|
# only test with Python 3.10 on Windows
|
2024-10-19 17:13:13 +10:00
|
|
|
# - os: windows-latest
|
|
|
|
# python-version: "3.10"
|
2020-06-26 18:31:58 +09:30
|
|
|
|
|
|
|
steps:
|
2024-05-17 12:14:47 +07:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-26 18:31:58 +09:30
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-05-17 12:14:47 +07:00
|
|
|
uses: actions/setup-python@v5
|
2020-06-26 18:31:58 +09:30
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2020-10-20 10:50:46 +10:30
|
|
|
- name: Display Python version
|
2020-10-20 10:52:26 +10:30
|
|
|
run: python -c "import sys; print(sys.version)"
|
2020-06-26 18:31:58 +09:30
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2023-08-10 23:16:57 +10:00
|
|
|
python -m pip install .[dev]
|
2024-10-19 16:22:29 +10:00
|
|
|
|
|
|
|
- name: Install Windows specific dependencies
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
|
|
|
python -m pip install -r win-requirements.txt
|
2024-10-19 17:00:32 +10:00
|
|
|
curl -O "http://www.win10pcap.org/download/Win10Pcap-v10.2-5002.msi"
|
2024-10-19 17:04:10 +10:00
|
|
|
msiexec /i "Win10Pcap-v10.2-5002.msi" /qn /norestart
|
2024-10-19 16:22:29 +10:00
|
|
|
|
2020-06-26 18:31:58 +09:30
|
|
|
- name: Lint with flake8
|
|
|
|
run: |
|
|
|
|
# stop the build if there are Python syntax errors or undefined names
|
|
|
|
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
|
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2020-10-20 10:50:46 +10:30
|
|
|
python -m pytest -vv
|