diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 1194b676..f0698966 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -19,11 +19,11 @@ jobs: uses: dawidd6/action-download-artifact@v6 with: workflow: osx-build-test-amd64.yml - path: dist + path: . - name: "Download Linux/amd64 artifacts" uses: dawidd6/action-download-artifact@v6 with: - workflow: osx-build-test-amd64.yml + workflow: linux-build-test-amd64.yml path: . - name: "Download Linux/arm64 artifacts" uses: dawidd6/action-download-artifact@v6 @@ -45,11 +45,8 @@ jobs: with: path: dist - name: show dist layout - run: | - ls -al - ls -al dist - find dist - - name: Publish distribution 📦 to PyPI + run: find dist + - name: Publish distribution 📦 to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 test-pypi-packages: runs-on: ${{ matrix.os }} @@ -71,16 +68,4 @@ jobs: run: | python3 -m venv venv venv/bin/pip install --upgrade pip - venv/bin/pip install 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 + venv/bin/pip install --extra-index-url https://test.pypi.org/simple/ python-snap7[test] diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 772f48e2..0d405073 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -19,11 +19,11 @@ jobs: uses: dawidd6/action-download-artifact@v6 with: workflow: osx-build-test-amd64.yml - path: dist + path: . - name: "Download Linux/amd64 artifacts" uses: dawidd6/action-download-artifact@v6 with: - workflow: osx-build-test-amd64.yml + workflow: linux-build-test-amd64.yml path: . - name: "Download Linux/arm64 artifacts" uses: dawidd6/action-download-artifact@v6 @@ -45,14 +45,12 @@ jobs: with: path: dist - name: show dist layout - run: | - ls -al - ls -al dist - find dist + run: find dist - name: Publish distribution 📦 to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ + verbose: true test-pypi-packages: runs-on: ${{ matrix.os }} needs: publish-to-testpypi @@ -73,16 +71,4 @@ jobs: 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 + venv/bin/pip install --extra-index-url https://test.pypi.org/simple/ python-snap7[test] diff --git a/.github/workflows/windows-build-test-amd64.yml b/.github/workflows/windows-build-test-amd64.yml index 1526c05a..ee9674bf 100644 --- a/.github/workflows/windows-build-test-amd64.yml +++ b/.github/workflows/windows-build-test-amd64.yml @@ -20,14 +20,12 @@ jobs: mkdir -p snap7/lib/ Copy-Item .\snap7-full-1.4.2\release\Windows\Win64\snap7.dll .\snap7\lib python3 -m build . --wheel -C="--build-option=--plat-name=win_amd64" - mkdir -p wheelhouse/${{ runner.os }}/ - cp dist/*.whl wheelhouse/${{ runner.os }}/ - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: wheels-${{ runner.os }} - path: wheelhouse/${{ runner.os }}/*.whl + name: dist + path: dist/*.whl windows-test-amd64: name: Testing wheels for AMD64 windows @@ -49,13 +47,18 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: wheels-${{ runner.os }} - path: wheelhouse + name: dist + path: dist + + - name: List files + run: | + dir + dir dist - name: Install python-snap7 run: | python3 -m pip install --upgrade pip pytest - python3 -m pip install $(ls wheelhouse/*.whl) + python3 -m pip install $(ls dist/*.whl) - name: Run pytest run: |