Merge pull request #352 from pylast/rm-travis
This commit is contained in:
commit
46a3dbf4a6
21
.github/release-drafter.yml
vendored
21
.github/release-drafter.yml
vendored
|
@ -1,5 +1,5 @@
|
||||||
name-template: "$NEXT_PATCH_VERSION"
|
name-template: "Release $RESOLVED_VERSION"
|
||||||
tag-template: "$NEXT_PATCH_VERSION"
|
tag-template: "$RESOLVED_VERSION"
|
||||||
|
|
||||||
categories:
|
categories:
|
||||||
- title: "Added"
|
- title: "Added"
|
||||||
|
@ -26,3 +26,20 @@ template: |
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
$CHANGES
|
$CHANGES
|
||||||
|
|
||||||
|
version-resolver:
|
||||||
|
major:
|
||||||
|
labels:
|
||||||
|
- "changelog: Removed"
|
||||||
|
minor:
|
||||||
|
labels:
|
||||||
|
- "changelog: Added"
|
||||||
|
- "changelog: Changed"
|
||||||
|
- "changelog: Deprecated"
|
||||||
|
- "enhancement"
|
||||||
|
|
||||||
|
patch:
|
||||||
|
labels:
|
||||||
|
- "changelog: Fixed"
|
||||||
|
- "bug"
|
||||||
|
default: minor
|
||||||
|
|
57
.github/workflows/deploy.yml
vendored
Normal file
57
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.repository == 'pylast/pylast'
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: deploy-${{ hashFiles('**/setup.py') }}
|
||||||
|
restore-keys: |
|
||||||
|
deploy-
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install -U pip
|
||||||
|
python -m pip install -U setuptools twine wheel
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
python setup.py --version
|
||||||
|
python setup.py sdist --format=gztar bdist_wheel
|
||||||
|
twine check dist/*
|
||||||
|
|
||||||
|
- name: Publish package to PyPI
|
||||||
|
if: github.event.action == 'published'
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.pypi_password }}
|
||||||
|
|
||||||
|
- name: Publish package to TestPyPI
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.test_pypi_password }}
|
||||||
|
repository_url: https://test.pypi.org/legacy/
|
2
.github/workflows/labels.yml
vendored
2
.github/workflows/labels.yml
vendored
|
@ -11,5 +11,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: micnncim/action-label-syncer@v1
|
- uses: micnncim/action-label-syncer@v1
|
||||||
|
with:
|
||||||
|
prune: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
32
.github/workflows/lint.yml
vendored
32
.github/workflows/lint.yml
vendored
|
@ -2,39 +2,11 @@ name: Lint
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 1
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
- name: Cache
|
- uses: pre-commit/action@v2.0.0
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/pip
|
|
||||||
~/.cache/pre-commit
|
|
||||||
key:
|
|
||||||
lint-v2-${{ hashFiles('**/setup.py') }}-${{
|
|
||||||
hashFiles('**/.pre-commit-config.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
lint-v2-
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install -U pip
|
|
||||||
python -m pip install -U tox
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: tox -e lint
|
|
||||||
env:
|
|
||||||
PRE_COMMIT_COLOR: always
|
|
||||||
|
|
63
.github/workflows/test.yml
vendored
Normal file
63
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10-dev", "pypy3"]
|
||||||
|
os: [ubuntu-20.04]
|
||||||
|
include:
|
||||||
|
# Include new variables for Codecov
|
||||||
|
- { codecov-flag: GHA_Ubuntu2004, os: ubuntu-20.04 }
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Get pip cache dir
|
||||||
|
id: pip-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
|
key:
|
||||||
|
${{ matrix.os }}-${{ matrix.python-version }}-v3-${{
|
||||||
|
hashFiles('**/setup.py') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ matrix.os }}-${{ matrix.python-version }}-v3-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install -U pip
|
||||||
|
python -m pip install -U wheel
|
||||||
|
python -m pip install -U tox
|
||||||
|
|
||||||
|
- name: Tox tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
tox -e py
|
||||||
|
env:
|
||||||
|
PYLAST_API_KEY: ${{ secrets.PYLAST_API_KEY }}
|
||||||
|
PYLAST_API_SECRET: ${{ secrets.PYLAST_API_SECRET }}
|
||||||
|
PYLAST_PASSWORD_HASH: ${{ secrets.PYLAST_PASSWORD_HASH }}
|
||||||
|
PYLAST_USERNAME: ${{ secrets.PYLAST_USERNAME }}
|
||||||
|
|
||||||
|
- name: Upload coverage
|
||||||
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
flags: ${{ matrix.codecov-flag }}
|
||||||
|
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
|
|
@ -3,8 +3,6 @@ pull_request_rules:
|
||||||
conditions:
|
conditions:
|
||||||
- label=automerge
|
- label=automerge
|
||||||
- status-success=build
|
- status-success=build
|
||||||
- status-success=continuous-integration/travis-ci/pr
|
|
||||||
- status-success=continuous-integration/travis-ci/push
|
|
||||||
actions:
|
actions:
|
||||||
merge:
|
merge:
|
||||||
method: merge
|
method: merge
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.7.2
|
rev: v2.7.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ["--py36-plus"]
|
args: ["--py36-plus"]
|
||||||
|
@ -15,7 +15,7 @@ repos:
|
||||||
types: []
|
types: []
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.5.4
|
rev: 5.6.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
|
@ -26,12 +26,12 @@ repos:
|
||||||
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
|
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/pygrep-hooks
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||||
rev: v1.6.0
|
rev: v1.7.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: python-check-blanket-noqa
|
- id: python-check-blanket-noqa
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.2.0
|
rev: v3.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
|
66
.travis.yml
66
.travis.yml
|
@ -1,66 +0,0 @@
|
||||||
language: python
|
|
||||||
cache:
|
|
||||||
pip: true
|
|
||||||
directories:
|
|
||||||
- $HOME/.cache/pre-commit
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- secure: ivg6II471E9HV8xyqnawLIuP/sZ0J63Y+BC0BQcRVKtLn/K3zmD1ozM3TFL9S549Nxd0FqDKHXJv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I7Vtf0oaZBzyulODHK8h/mzJp4HwezyfOu0RCedq6sloGQr1/29CvWWESaYyoGoGz9Mz2ZS+MpIcjGISfZa+x4vSp6QPFvd4i/1Z/1j2gJVVyswkrIVUwZIDJtfAKzZI5iHx2gH8Y=
|
|
||||||
- secure: SsKJoJwtDVWrL5xxl9C/gTRy6FhfRQQNNAFOogl9mTs/WeI2t9QTYoKsxLPXOdoRdu4MvT3h/B2sjwggt7zP81fBVxQRTkg4nq0zSHlj0NqclbFa6I5lUYdGwH9gPk/HWJJwXhKRDsqn/iRw2v+qBDs/j3kIgPQ0yjM58LEPXic=
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- python: 3.8
|
|
||||||
env: TOXENV=lint
|
|
||||||
- python: 3.9
|
|
||||||
- python: 3.8
|
|
||||||
- python: 3.7
|
|
||||||
- python: 3.6
|
|
||||||
- python: 3.10-dev
|
|
||||||
- python: pypy3
|
|
||||||
|
|
||||||
install:
|
|
||||||
- travis_retry pip install -U pip
|
|
||||||
- travis_retry pip install -U tox-travis
|
|
||||||
|
|
||||||
script: tox
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [ "$TOXENV" != "lint" ]; then
|
|
||||||
travis_retry pip install -U coveralls && coveralls
|
|
||||||
travis_retry pip install -U codecov && codecov
|
|
||||||
fi
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
- provider: pypi
|
|
||||||
server: https://test.pypi.org/legacy/
|
|
||||||
on:
|
|
||||||
tags: false
|
|
||||||
repo: pylast/pylast
|
|
||||||
branch: master
|
|
||||||
condition: $TOXENV = lint
|
|
||||||
user: hugovk
|
|
||||||
password:
|
|
||||||
secure: "OCNT7Sf7TpS6aKuqBXEWxJZjmEpdERTBp/yllOd9xnpFt2ZL96CyKtAhPA8zu5OP58QFEZSafZRfXYJoz78RDrx3gOdRXCFT00vXIMnjVvrAlieNEHCVAT0kRW9lYK1Cf5baHYsOYIs6EZf2fEAhdzvmh83G4Y1Y+FPR9tA6uy8="
|
|
||||||
distributions: sdist --format=gztar bdist_wheel
|
|
||||||
skip_existing: true
|
|
||||||
- provider: pypi
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
repo: pylast/pylast
|
|
||||||
branch: master
|
|
||||||
condition: $TOXENV = lint
|
|
||||||
user: hugovk
|
|
||||||
password:
|
|
||||||
secure: "OCNT7Sf7TpS6aKuqBXEWxJZjmEpdERTBp/yllOd9xnpFt2ZL96CyKtAhPA8zu5OP58QFEZSafZRfXYJoz78RDrx3gOdRXCFT00vXIMnjVvrAlieNEHCVAT0kRW9lYK1Cf5baHYsOYIs6EZf2fEAhdzvmh83G4Y1Y+FPR9tA6uy8="
|
|
||||||
distributions: sdist --format=gztar bdist_wheel
|
|
||||||
skip_existing: true
|
|
|
@ -4,10 +4,9 @@ pyLast
|
||||||
[](https://pypi.org/project/pylast/)
|
[](https://pypi.org/project/pylast/)
|
||||||
[](https://pypi.org/project/pylast/)
|
[](https://pypi.org/project/pylast/)
|
||||||
[](https://pypistats.org/packages/pylast)
|
[](https://pypistats.org/packages/pylast)
|
||||||
[](https://travis-ci.org/pylast/pylast)
|
[](https://github.com/pylast/pylast/actions)
|
||||||
[](https://codecov.io/gh/pylast/pylast)
|
[](https://codecov.io/gh/pylast/pylast)
|
||||||
[](https://coveralls.io/github/pylast/pylast?branch=master)
|
[](https://github.com/psf/black)
|
||||||
[](https://github.com/python/black)
|
|
||||||
[](https://zenodo.org/badge/latestdoi/7803088)
|
[](https://zenodo.org/badge/latestdoi/7803088)
|
||||||
|
|
||||||
A Python interface to [Last.fm](https://www.last.fm/) and other API-compatible websites such as [Libre.fm](https://libre.fm/).
|
A Python interface to [Last.fm](https://www.last.fm/) and other API-compatible websites such as [Libre.fm](https://libre.fm/).
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# Release Checklist
|
# Release Checklist
|
||||||
|
|
||||||
* [ ] Get master to the appropriate code release state.
|
* [ ] Get master to the appropriate code release state.
|
||||||
[Travis CI](https://travis-ci.org/pylast/pylast) should be running cleanly for
|
[GitHub Actions](https://github.com/pylast/pylast/actions) should be running cleanly for
|
||||||
all merges to master.
|
all merges to master.
|
||||||
|
[](https://github.com/pylast/pylast/actions)
|
||||||
|
|
||||||
* [ ] Edit release draft, adjust text if needed:
|
* [ ] Edit release draft, adjust text if needed:
|
||||||
https://github.com/pylast/pylast/releases
|
https://github.com/pylast/pylast/releases
|
||||||
|
@ -13,8 +14,8 @@
|
||||||
|
|
||||||
* [ ] Publish release
|
* [ ] Publish release
|
||||||
|
|
||||||
* [ ] Check the tagged [Travis CI build](https://travis-ci.org/pylast/pylast) has
|
* [ ] Check the tagged [GitHub Actions build](https://github.com/pylast/pylast/actions?query=workflow%3ADeploy)
|
||||||
deployed to [PyPI](https://pypi.org/project/pylast/#history)
|
has deployed to [PyPI](https://pypi.org/project/pylast/#history)
|
||||||
|
|
||||||
* [ ] Check installation:
|
* [ ] Check installation:
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ class TestPyLastNetwork(TestPyLastWithLastFm):
|
||||||
self.network.enable_rate_limit()
|
self.network.enable_rate_limit()
|
||||||
then = time.time()
|
then = time.time()
|
||||||
# Make some network call, limit not applied first time
|
# Make some network call, limit not applied first time
|
||||||
self.network.get_user(self.username)
|
self.network.get_top_artists()
|
||||||
# Make a second network call, limiting should be applied
|
# Make a second network call, limiting should be applied
|
||||||
self.network.get_top_artists()
|
self.network.get_top_artists()
|
||||||
now = time.time()
|
now = time.time()
|
||||||
|
|
10
tox.ini
10
tox.ini
|
@ -3,11 +3,11 @@ envlist =
|
||||||
py{py3, 310, 39, 38, 37, 36}
|
py{py3, 310, 39, 38, 37, 36}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv =
|
passenv =
|
||||||
PYLAST_API_KEY = {env:PYLAST_API_KEY:}
|
PYLAST_API_KEY
|
||||||
PYLAST_API_SECRET = {env:PYLAST_API_SECRET:}
|
PYLAST_API_SECRET
|
||||||
PYLAST_PASSWORD_HASH = {env:PYLAST_PASSWORD_HASH:}
|
PYLAST_PASSWORD_HASH
|
||||||
PYLAST_USERNAME = {env:PYLAST_USERNAME:}
|
PYLAST_USERNAME
|
||||||
extras =
|
extras =
|
||||||
tests
|
tests
|
||||||
commands =
|
commands =
|
||||||
|
|
Loading…
Reference in a new issue