From a38b42062117e3a2e805bcdac5b75ca610f5db38 Mon Sep 17 00:00:00 2001 From: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> Date: Mon, 10 Oct 2022 22:59:44 +0200 Subject: [PATCH] update github actions --- .github/workflows/build.yml | 47 +++++++++++++++++++++---------- .github/workflows/format-code.yml | 6 ++-- setup.py | 1 + 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aad9274fe..93094017f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,17 +13,21 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] experimental: [false] - python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "pypy-3.8"] - include: - # Only test on a single configuration while there are just pre-releases - - os: ubuntu-latest - experimental: true - python-version: "3.11.0-alpha - 3.11.0" + python-version: [ + "3.7", + "3.8", + "3.9", + "3.10", + "3.11.0-alpha - 3.11.0", + "pypy-3.7", + "pypy-3.8", + "pypy-3.9", + ] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -34,16 +38,16 @@ jobs: run: | tox -e gh - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: fail_ci_if_error: true static-code-analysis: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies @@ -75,9 +79,9 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies @@ -91,9 +95,9 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies @@ -109,3 +113,16 @@ jobs: name: sphinx-out path: ./build/ retention-days: 5 + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Build wheel and sdist + run: pipx run build + - name: Check build artifacts + run: pipx run twine check --strict dist/* diff --git a/.github/workflows/format-code.yml b/.github/workflows/format-code.yml index b86789662..68c6f56d8 100644 --- a/.github/workflows/format-code.yml +++ b/.github/workflows/format-code.yml @@ -9,9 +9,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies @@ -22,7 +22,7 @@ jobs: run: | black --verbose . - name: Commit Formated Code - uses: EndBug/add-and-commit@v7 + uses: EndBug/add-and-commit@v9 with: message: "Format code with black" # Ref https://git-scm.com/docs/git-add#_examples diff --git a/setup.py b/setup.py index adbd61f91..841425482 100644 --- a/setup.py +++ b/setup.py @@ -44,6 +44,7 @@ url="https://github.com/hardbyte/python-can", description="Controller Area Network interface module for Python", long_description=long_description, + long_description_content_type="text/x-rst", classifiers=[ # a list of all available ones: https://pypi.org/classifiers/ "Programming Language :: Python",