From d4b5536164e68060f010676dc3a99889648a44fc Mon Sep 17 00:00:00 2001 From: dulovics <31633715+dulovics@users.noreply.github.com> Date: Wed, 10 Feb 2021 18:34:05 +0100 Subject: [PATCH] Documented python 3.9 support and added gha workflow definitions with test.pypi.org test (#46) Co-authored-by: Attila Dulovics --- .github/workflows/main.yml | 66 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 38 ---------------------- setup.py | 3 +- tox.ini | 1 + 4 files changed, 69 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7573fa1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,66 @@ +name: comet-core CI + +on: + # Trigger the workflow on all push, pull request for the master branch and release events + push: + pull_request: + branches: [ master ] + types: [closed] + release: + types: [published] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + python: [3.6, 3.7, 3.8, 3.9] + include: # define single matrix case that performs the upload + - os: ubuntu-latest + python: 3.6 + upload: true + steps: + # Checks-out the repository under $GITHUB_WORKSPACE + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Cache pip check + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-mypy-${{ hashFiles('setup.py','requirements-dev.txt') }} + restore-keys: | + ${{ runner.os }}-pip-mypy- + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + - name: Run Tox + # Run tox using the version of Python in `PATH` + run: tox -e py + - name: Build python packages to /dist + run: | + pip install twine wheel + python setup.py sdist -d dist bdist_wheel -d dist + - name: Twine check for the build artifacts + run: | + python -m twine check dist/* + shell: bash + - name: Release package to pypi + if: matrix.upload && github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags') + run: | + python -m twine upload --skip-existing dist/* + shell: bash + env: + TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/" + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1570151..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -sudo: false - -language: python - -# setup caching -cache: pip - -# install tox -install: -- pip install tox - -# select tox envs to run -matrix: - include: - - python: 3.6 - env: TOXENV=black,lint - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - env: TOXENV=py37 - - python: 3.8 - env: TOXENV=py38 - -# run tox -script: -- tox - -# deploy -deploy: - provider: pypi - user: spotifysecurity - password: - secure: "vblI7dc+BbtccAJaXHyb9gzSPjIf9spiEsIlvIHBk6uJHIUmj7YMww8dwN3jTDT374KId28kHWAZu4P29DBQNBqGpQjZWlO2tla/1C3fzzN6vIxz3NhgQ/JCXKLs3PIq4p7JFwwagUGL22p8KkQiOGc7z7Z9yrYy8ybM9PKXCpUzeCN3wCtcUG/P5WBJuBaL79hFg+LbwfXz0m9YrJC6KMyv645skiqTeQrWFYuBG+Uh8IhX8jP71F0Uu9b//JILmEyS3HmXgX9if166s9Y9lH3/FU2Ac9rwSFcTAEYuSMcLh89Nj5dyxhXW/34TNwErirKGOTUZwKni+Dnrd2ZbuSqV52SFXyReCl8lwS/fpi8YxoBQvtjd2Hc42O6eW6xk6fCV0ncvsmstsMBbylcHzYXCMPUo3o2im7QhJ3q2P3QuyPZdRolbRlAzcLSq4M6h3z+UA2or/dXEYDGuQef31u/9rv8TiuzzY6xgABJm90NJpRrtwDaovlptuRHwWrf7z0bsTKpRFqZAFde8kFgAJnbVkQjyW+b5kiKCyKz5L1oT/K1l29WxQ0UDhXJHyaqBjo9Xr+MUuM+Yzgjn1NlNGh0XmsitwWz5+4AWTew8aWtQrHrDmDI9CKL7J3cOkt3ZUpy2Zkm+J3H6FfOA7U79kW1xP0GJ/vXicZQtNat/wz8=" - on: - tags: true - branch: master - condition: $TOXENV = py36 - distributions: sdist bdist_wheel diff --git a/setup.py b/setup.py index 943fb3b..2dd360b 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setuptools.setup( name="comet-core", - version="2.8.0", + version="2.8.1", url="https://github.com/spotify/comet-core", author="Spotify Platform Security", author_email="wasabi@spotify.com", @@ -33,5 +33,6 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", ], ) diff --git a/tox.ini b/tox.ini index 44b4a90..f15f4ca 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist= py36, py37, py38, + py39, [testenv] deps = -rrequirements-dev.txt