Skip to content

Commit

Permalink
lets see if this recv is causing all trouble
Browse files Browse the repository at this point in the history
  • Loading branch information
gijzelaerr committed Jul 5, 2024
1 parent 35b0755 commit 2b0846a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 42 deletions.
48 changes: 42 additions & 6 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Publish distribution 📦 to TestPyPI

on: push
on:
workflow_run:
workflows:
- "Build and test wheels linux/amd64"
- "Build and test wheels linux/arm64"
- "Build and test wheels osx/amd64"
- "Build and test wheels windows/amd64"
types:
- completed

jobs:
publish-to-testpypi:
Expand All @@ -12,11 +20,6 @@ jobs:
id-token: write # IMPORTANT: mandatory for trusted publishing

name: Publish distribution 📦 to TestPyPI
needs:
- linux-build-amd64
- linux-build-arm64
- osx-build
- windows-build
runs-on: ubuntu-latest
steps:
- name: Download macOS artifacts
Expand All @@ -43,3 +46,36 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
test-pypi-packages:
runs-on: ${{ matrix.os }}
needs: publish-to-testpypi
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, macos-14, macos-12, windows-2022, windows-2019]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install python-snap7
run: |
python3 -m venv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install -i https://test.pypi.org/simple/ python-snap7[test]
- name: Run pytest
run: |
venv/bin/pytest -m "server or util or client or mainloop"
- name: Run tests required sudo on Linux and macOS
if: ${{ runner.os == 'Linux' || runner.os == 'macOS'}}
run: sudo venv/bin/pytest -m partner

- name: On windows we don't need sudo
if: ${{ runner.os == 'Windows'}}
run: venv/bin/pytest -m partner
35 changes: 0 additions & 35 deletions .github/workflows/test-pypi-packages.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_as_b_send(self) -> None:

def test_b_send_recv(self) -> None:
self.partner.b_send()
self.partner.b_recv()
# self.partner.b_recv()

def test_check_as_b_recv_completion(self) -> None:
self.partner.check_as_b_recv_completion()
Expand Down

0 comments on commit 2b0846a

Please sign in to comment.