mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2026-04-05 22:45:42 +00:00
added support for python 3.12
This commit is contained in:
parent
e549f416e8
commit
6a152760c5
24 changed files with 289 additions and 313 deletions
129
.github/workflows/test.yml
vendored
129
.github/workflows/test.yml
vendored
|
|
@ -4,14 +4,59 @@ on: [push, pull_request]
|
|||
|
||||
jobs:
|
||||
test_linux:
|
||||
# Ubuntu 20.04 is still required for python 3.6; this doesn't work on Ubuntu 22.04 anymore
|
||||
runs-on: "ubuntu-20.04"
|
||||
name: "Ubuntu latest - Python ${{ matrix.python-version }}"
|
||||
name: "Ubuntu 20.04 - Python ${{ matrix.python-version }}"
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6"]
|
||||
redis-version: [6]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
- uses: "actions/setup-python@v4"
|
||||
with:
|
||||
python-version: "${{ matrix.python-version }}"
|
||||
cache: "pip"
|
||||
cache-dependency-path: |
|
||||
**/setup.py
|
||||
**/requirements*.txt
|
||||
|
||||
- name: "Install dependencies"
|
||||
run: |
|
||||
set -xe
|
||||
sudo apt-get install -y libxml2-dev libxslt-dev
|
||||
python -VV
|
||||
python -m pip install --upgrade pip setuptools
|
||||
python -m pip install -e .
|
||||
python -m pip install -r requirements-pytest.txt
|
||||
|
||||
- name: Start Redis
|
||||
uses: supercharge/redis-github-action@1.2.0
|
||||
with:
|
||||
redis-version: ${{ matrix.redis-version }}
|
||||
|
||||
- name: "Run tests for ${{ matrix.python-version }}"
|
||||
env:
|
||||
CLUBLOG_APIKEY: ${{ secrets.CLUBLOG_APIKEY }}
|
||||
QRZ_USERNAME: ${{ secrets.QRZ_USERNAME }}
|
||||
QRZ_PWD: ${{ secrets.QRZ_PWD }}
|
||||
PYTHON_VERSION: ${{ matrix.python-version }}
|
||||
# delay the execution randomly by a couple of seconds to reduce the amount
|
||||
# of concurrent API calls on Clublog and QRZ.com when all CI jobs execute simultaneously
|
||||
run: |
|
||||
sleep $[ ( $RANDOM % 10 ) + 1 ]s
|
||||
pytest ./test
|
||||
|
||||
test_linux_ubuntu_22:
|
||||
runs-on: "ubuntu-22.04"
|
||||
name: "Ubuntu 22.04 - Python ${{ matrix.python-version }}"
|
||||
env:
|
||||
USING_COVERAGE: '3.11'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy2.7", "pypy3.7", "pypy3.8", "pypy3.9"]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.7", "pypy3.8", "pypy3.9", "pypy3.10"]
|
||||
redis-version: [6]
|
||||
|
||||
steps:
|
||||
|
|
@ -49,8 +94,13 @@ jobs:
|
|||
# of concurrent API calls on Clublog and QRZ.com when all CI jobs execute simultaneously
|
||||
run: |
|
||||
sleep $[ ( $RANDOM % 10 ) + 1 ]s
|
||||
pytest --cov=./
|
||||
if [[ $PYTHON_VERSION == 3.11 ]]; then codecov; fi
|
||||
if [[ $PYTHON_VERSION == 3.11 ]]
|
||||
then
|
||||
pytest --cov=test/
|
||||
codecov
|
||||
else
|
||||
pytest test/
|
||||
fi
|
||||
cd docs && make html
|
||||
|
||||
# publish_package:
|
||||
|
|
@ -64,18 +114,58 @@ jobs:
|
|||
# user: __token__
|
||||
# password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
|
||||
test_macos:
|
||||
# Ubuntu 20.04 is still required for python 3.6; this doesn't work on Ubuntu 22.04 anymore
|
||||
runs-on: "macos-12"
|
||||
name: "MacOS 12 - Python ${{ matrix.python-version }}"
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"]
|
||||
redis-version: [6]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
- uses: "actions/setup-python@v4"
|
||||
with:
|
||||
python-version: "${{ matrix.python-version }}"
|
||||
cache: "pip"
|
||||
cache-dependency-path: |
|
||||
**/setup.py
|
||||
**/requirements*.txt
|
||||
|
||||
- name: "Install dependencies"
|
||||
run: |
|
||||
set -xe
|
||||
python -VV
|
||||
python -m pip install --upgrade pip setuptools
|
||||
python -m pip install -e .
|
||||
python -m pip install -r requirements-pytest.txt
|
||||
|
||||
- name: Start Redis
|
||||
uses: shogo82148/actions-setup-redis@v1.31.1
|
||||
with:
|
||||
redis-version: ${{ matrix.redis-version }}
|
||||
|
||||
- name: "Run tests for ${{ matrix.python-version }}"
|
||||
env:
|
||||
CLUBLOG_APIKEY: ${{ secrets.CLUBLOG_APIKEY }}
|
||||
QRZ_USERNAME: ${{ secrets.QRZ_USERNAME }}
|
||||
QRZ_PWD: ${{ secrets.QRZ_PWD }}
|
||||
PYTHON_VERSION: ${{ matrix.python-version }}
|
||||
# delay the execution randomly by a couple of seconds to reduce the amount
|
||||
# of concurrent API calls on Clublog and QRZ.com when all CI jobs execute simultaneously
|
||||
run: |
|
||||
sleep $[ ( $RANDOM % 10 ) + 1 ]
|
||||
pytest ./test
|
||||
|
||||
test_windows:
|
||||
runs-on: "windows-latest"
|
||||
name: "Windows latest - Python ${{ matrix.python-version }}"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
# lxml support for windows/python3.11 still missing (Dec 2022)
|
||||
# https://github.com/lxml/lxml/pull/360
|
||||
# python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
# python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||
# disable python 3.6 on windows due to lxml / bs4 problems on Github Actions
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
|
|
@ -94,24 +184,27 @@ jobs:
|
|||
python -m pip install -r requirements-pytest.txt
|
||||
python -m pip install -r requirements-docs.txt
|
||||
- name: Setup redis
|
||||
# We have to download and install a non-official redis windows port
|
||||
# since there is no official redis version for windows.
|
||||
# 5.0 is good enough for our purposes. After installing the msi,
|
||||
# redis will startup as a service.
|
||||
# There are no github-actions supporting redis on windows.
|
||||
# Github Actions Container services are also not available for windows.
|
||||
# We have to download and install a non-official redis windows port
|
||||
# since there is no official redis version for windows.
|
||||
# Redis is then installed an run as a service
|
||||
run: |
|
||||
C:\msys64\usr\bin\wget.exe https://github.com/tporadowski/redis/releases/download/v5.0.14.1/Redis-x64-5.0.14.1.msi
|
||||
msiexec /quiet /i Redis-x64-5.0.14.1.msi
|
||||
C:\msys64\usr\bin\wget.exe https://github.com/redis-windows/redis-windows/releases/download/7.0.14/Redis-7.0.14-Windows-x64-with-Service.tar.gz
|
||||
C:\msys64\usr\bin\tar.exe -xvzf Redis-7.0.14-Windows-x64-with-Service.tar.gz
|
||||
sc.exe create Redis binpath=D:\a\pyhamtools\pyhamtools\Redis-7.0.14-Windows-x64-with-Service\RedisService.exe start= auto
|
||||
net start Redis
|
||||
|
||||
- name: "Run tests for ${{ matrix.python-version }}"
|
||||
env:
|
||||
CLUBLOG_APIKEY: ${{ secrets.CLUBLOG_APIKEY }}
|
||||
QRZ_USERNAME: ${{ secrets.QRZ_USERNAME }}
|
||||
QRZ_PWD: ${{ secrets.QRZ_PWD }}
|
||||
PYTHON_VERSION: ${{ matrix.python-version }}
|
||||
# delay the execution randomly by 1-20sec to reduce the
|
||||
# give redis service time to startup and
|
||||
# delay the execution randomly by 5-20sec to reduce the
|
||||
# amount of concurrent API calls on Clublog and QRZ.com
|
||||
# when all CI jobs execute simultaneously
|
||||
run: |
|
||||
start-sleep -Seconds (1..10 | get-random)
|
||||
start-sleep -Seconds (5..20 | get-random)
|
||||
pytest
|
||||
Loading…
Add table
Add a link
Reference in a new issue