Skip to content

chore: use pymodbus version 3.7.4 known to work with Modbus TCP #2

chore: use pymodbus version 3.7.4 known to work with Modbus TCP

chore: use pymodbus version 3.7.4 known to work with Modbus TCP #2

Workflow file for this run

name: Run tests
on:
push:
branches-ignore:
- "gh-readonly-queue/**"
tags:
- "*"
workflow_dispatch:
pull_request:
merge_group:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build container
run: docker build -t pdudaemon-ci -f Dockerfile.dockerhub .
- name: Run pytest
run: docker run -v $(pwd):/p -w /p pdudaemon-ci /root/.local/pipx/venvs/pdudaemon/bin/pytest
- name: Run functional tests
run: docker run -v $(pwd):/p -w /p pdudaemon-ci sh -c "./share/pdudaemon-test.sh"
tests-trixie:
runs-on: ubuntu-latest
steps:
- name: check out repository code
uses: actions/checkout@v4
- name: Build container
run: docker build --build-arg DEBIAN_VERSION=trixie -t pdudaemon-ci -f Dockerfile.dockerhub .
- name: Run pytest
run: docker run -v $(pwd):/p -w /p pdudaemon-ci /root/.local/share/pipx/venvs/pdudaemon/bin/pytest
- name: Run functional tests
run: docker run -v $(pwd):/p -w /p pdudaemon-ci sh -c "./share/pdudaemon-test.sh"
tests-trixie-python312:
runs-on: ubuntu-latest
steps:
- name: check out repository code
uses: actions/checkout@v4
- name: Build container
run: >
docker build
--build-arg DEBIAN_VERSION=trixie
--build-arg PYTHON=python3.12
-t pdudaemon-ci -f Dockerfile.dockerhub
.
- name: Run pytest
run: docker run -v $(pwd):/p -w /p pdudaemon-ci /root/.local/share/pipx/venvs/pdudaemon/bin/pytest
- name:
# disable snmp as pysnmp is incompatible with python3.12
run: sed -i 's,"snmpv.","localcmdline",g' share/pdudaemon.conf
- name: Run functional tests
run: docker run -v $(pwd):/p -w /p pdudaemon-ci sh -c "./share/pdudaemon-test.sh"
build:
needs:
- tests
- tests-trixie
- tests-trixie-python312
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
# include tags and full history for setuptools_scm
fetch-depth: 0
- name: Install build deps
run: python -m pip install -U build
- name: Build package
run: python -m build
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
pypi-publish-test:
if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/main') }}
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish distribution package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
pypi-publish:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
needs: pypi-publish-test
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1