mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2025-12-06 06:52:00 +01:00
updated CI build system
This commit is contained in:
parent
a12616ceca
commit
b51b32e575
77
.github/workflows/test.yml
vendored
77
.github/workflows/test.yml
vendored
|
|
@ -3,61 +3,17 @@ name: Linux
|
|||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test_linux_legacy:
|
||||
# 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 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:
|
||||
runs-on: "ubuntu-22.04"
|
||||
name: "Ubuntu 22.04 - Python ${{ matrix.python-version }}"
|
||||
runs-on: "ubuntu-24.04"
|
||||
name: "Ubuntu 24.04 - Python ${{ matrix.python-version }}"
|
||||
env:
|
||||
USING_COVERAGE: '3.11'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"]
|
||||
redis-version: [6]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"]
|
||||
redis-version: [7]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
|
|
@ -93,7 +49,7 @@ jobs:
|
|||
# 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
|
||||
sleep $[ ( $RANDOM % 60 ) + 1 ]s
|
||||
if [[ $PYTHON_VERSION == 3.11 ]]
|
||||
then
|
||||
pytest --cov=test/
|
||||
|
|
@ -116,13 +72,12 @@ jobs:
|
|||
|
||||
|
||||
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 }}"
|
||||
runs-on: "macos-15"
|
||||
name: "MacOS 15 - Python ${{ matrix.python-version }}"
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"]
|
||||
redis-version: [6]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"]
|
||||
redis-version: [7.2]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
|
|
@ -143,7 +98,7 @@ jobs:
|
|||
python -m pip install -r requirements-pytest.txt
|
||||
|
||||
- name: Start Redis
|
||||
uses: shogo82148/actions-setup-redis@v1.31.1
|
||||
uses: shogo82148/actions-setup-redis@v1
|
||||
with:
|
||||
redis-version: ${{ matrix.redis-version }}
|
||||
|
||||
|
|
@ -156,16 +111,16 @@ jobs:
|
|||
# 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 ]
|
||||
sleep $[ ( $RANDOM % 60 ) + 1 ]
|
||||
pytest ./test
|
||||
|
||||
test_windows:
|
||||
runs-on: "windows-latest"
|
||||
runs-on: "windows-2022"
|
||||
name: "Windows latest - Python ${{ matrix.python-version }}"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
|
|
@ -193,8 +148,10 @@ jobs:
|
|||
C:\msys64\usr\bin\wget.exe https://github.com/redis-windows/redis-windows/releases/download/7.0.14/Redis-7.0.14-Windows-x64-msys2-with-Service.zip
|
||||
C:\msys64\usr\bin\pacman.exe -S --noconfirm unzip
|
||||
C:\msys64\usr\bin\unzip.exe Redis-7.0.14-Windows-x64-msys2-with-Service.zip
|
||||
sc.exe create Redis binpath=D:\a\pyhamtools\pyhamtools\Redis-7.0.14-Windows-x64-msys2-with-Service\RedisService.exe start= auto
|
||||
sc.exe create Redis binpath=${{ github.workspace }}\Redis-7.0.14-Windows-x64-msys2-with-Service\RedisService.exe start= auto
|
||||
echo "Redis service created, now starting it"
|
||||
net start Redis
|
||||
echo "Redis service started"
|
||||
|
||||
- name: "Run tests for ${{ matrix.python-version }}"
|
||||
env:
|
||||
|
|
@ -207,5 +164,5 @@ jobs:
|
|||
# amount of concurrent API calls on Clublog and QRZ.com
|
||||
# when all CI jobs execute simultaneously
|
||||
run: |
|
||||
start-sleep -Seconds (5..20 | get-random)
|
||||
start-sleep -Seconds (5..60 | get-random)
|
||||
pytest
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
pytest>=7.0.0; python_version>='3.7'
|
||||
pytest==4.6.11; python_version=='3.6'
|
||||
pytest>=7.0.0
|
||||
pytest-blockage>=0.2.2
|
||||
pytest-localserver>=0.5
|
||||
pytest-cov>=2.12
|
||||
maidenhead==1.6.0
|
||||
requests==2.32.2
|
||||
bs4==4.13.3
|
||||
requests>=2.32.4
|
||||
beautifulsoup4==4.13.4
|
||||
redis==5.2.1
|
||||
ephem==4.2
|
||||
Loading…
Reference in a new issue