Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Documented python 3.9 support and added gha workflow definitions with…
Browse files Browse the repository at this point in the history
… test.pypi.org test (#46)

Co-authored-by: Attila Dulovics <[email protected]>
  • Loading branch information
dulovics and dulovics authored Feb 10, 2021
1 parent 0df0879 commit d4b5536
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 39 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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 }}
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]",
Expand All @@ -33,5 +33,6 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ envlist=
py36,
py37,
py38,
py39,

[testenv]
deps = -rrequirements-dev.txt
Expand Down

0 comments on commit d4b5536

Please sign in to comment.