From 31300a19a9a4536237d4e9a349f8858ebda410ce Mon Sep 17 00:00:00 2001 From: learnforpractice Date: Mon, 29 May 2023 18:20:15 +0800 Subject: [PATCH] Update python-app.yml --- .github/workflows/python-app.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0436990..8e7f7d8 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -25,14 +25,14 @@ jobs: strategy: matrix: python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] - os: ['windows-2019', 'ubuntu-18.04', 'macos-10.15'] + os: ['windows-2019', 'ubuntu-20.04', 'macos-12'] # python-version: [3.9] # os: ['windows-latest'] fail-fast: false steps: - name: Install scoop - if: ${{ matrix.os == 'windows-2019' }} + if: ${{ matrix.os == 'windows-2019' }} run: | iex "& {$(irm get.scoop.sh)} -RunAsAdmin" scoop install ninja gcc @@ -79,18 +79,19 @@ jobs: run: | python -m pip uninstall mixin-python -y;python -m pip install ./dist/${{ steps.whlfile.outputs.value }} - name: Test + if: ${{ matrix.os != 'windows-2019' }} working-directory: tests run: | python -m pip install -r ../requirements-dev.txt python3 -m pytest -s -x test_mixin_api.py - - name: Test + - name: Test2 if: ${{ matrix.os != 'windows-2019' }} working-directory: tests run: | python3 -m pytest -s -x test_testnet2.py -k test_hello python3 -m pytest -s -x test_testnet2.py -k test_deposit - name: auditwheel repair - if: ${{ matrix.os == 'ubuntu-18.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} id: manylinuxwhlfile working-directory: ./dist run: | @@ -105,20 +106,20 @@ jobs: files: | ./dist/${{ steps.whlfile.outputs.value }} - name: Release manylinux wheel - if: ${{ matrix.os == 'ubuntu-18.04' && startsWith(github.ref, 'refs/tags/') }} + if: ${{ matrix.os == 'ubuntu-20.04' && startsWith(github.ref, 'refs/tags/') }} uses: softprops/action-gh-release@v1 with: files: | ./dist/wheelhouse/${{ steps.manylinuxwhlfile.outputs.value }} - name: Downloading whl files - if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.10' }} + if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.10' }} working-directory: dist run: | rm *.whl rm -r wheelhouse python ../scripts/download.py ${{ env.VERSION }} - name: Publish a Python distribution to PyPI - if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.10' }} + if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.10' }} uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__