From 450f931e2ad44ec21b9dbbdfbc60ed0c382bb685 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Sat, 27 Nov 2021 16:48:59 -0600 Subject: [PATCH] Workflow: Python 3.10 and more. - Add Python 3.10 to test matrix. - Use python -mbuild to build packages. - Check built packages with 'twine check'. --- .github/workflows/basic_test.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basic_test.yaml b/.github/workflows/basic_test.yaml index fb22adb..d1cb3e7 100644 --- a/.github/workflows/basic_test.yaml +++ b/.github/workflows/basic_test.yaml @@ -4,6 +4,7 @@ # pyocd-pemicro workflow for: # - checking code with flake8 # - test build of sdist and wheel +# - check built sdist and wheel with twine name: basic test @@ -15,7 +16,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" steps: - uses: actions/checkout@v2 @@ -36,13 +42,13 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.*', '**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- - name: Install dependencies run: | - python -m pip install --upgrade setuptools pip wheel flake8 + python -m pip install --upgrade setuptools pip wheel flake8 build twine - name: Setup flake8 annotations # This commit is v1. Using exact commit for security. @@ -55,4 +61,8 @@ jobs: - name: Test build run: | - python setup.py sdist bdist_wheel + python -mbuild + + - name: Check packages + run: | + twine check dist/*