commit
d3ba0be1a3
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
|
@ -12,7 +12,7 @@ on:
|
|||
jobs:
|
||||
deploy:
|
||||
if: github.repository_owner == 'pylast'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -24,7 +24,7 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
cache: pip
|
||||
cache-dependency-path: "setup.py"
|
||||
cache-dependency-path: setup.cfg
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]
|
|||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
18
.github/workflows/require-pr-label.yml
vendored
Normal file
18
.github/workflows/require-pr-label.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
name: Require PR label
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, labeled, unlabeled, synchronize]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: mheap/github-action-required-labels@v1
|
||||
with:
|
||||
mode: minimum
|
||||
count: 1
|
||||
labels:
|
||||
"changelog: Added, changelog: Changed, changelog: Deprecated, changelog:
|
||||
Fixed, changelog: Removed, changelog: Security, changelog: skip"
|
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
|
@ -11,11 +11,8 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"]
|
||||
os: [ubuntu-20.04]
|
||||
include:
|
||||
# Include new variables for Codecov
|
||||
- { codecov-flag: GHA_Ubuntu2004, os: ubuntu-20.04 }
|
||||
python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -25,7 +22,7 @@ jobs:
|
|||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: pip
|
||||
cache-dependency-path: "setup.py"
|
||||
cache-dependency-path: setup.cfg
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
@ -45,5 +42,13 @@ jobs:
|
|||
- name: Upload coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
flags: ${{ matrix.codecov-flag }}
|
||||
flags: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
|
||||
|
||||
success:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
name: test successful
|
||||
steps:
|
||||
- name: Success
|
||||
run: echo Test successful
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.31.1
|
||||
rev: v2.32.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py37-plus]
|
||||
|
@ -35,7 +35,7 @@ repos:
|
|||
- id: python-check-blanket-noqa
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.1.0
|
||||
rev: v4.2.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: check-yaml
|
||||
|
@ -44,6 +44,7 @@ repos:
|
|||
rev: v1.20.1
|
||||
hooks:
|
||||
- id: setup-cfg-fmt
|
||||
args: [--max-py-version=3.11]
|
||||
|
||||
- repo: https://github.com/tox-dev/tox-ini-fmt
|
||||
rev: 0.5.2
|
||||
|
|
|
@ -18,6 +18,7 @@ classifiers =
|
|||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
Programming Language :: Python :: Implementation :: PyPy
|
||||
Topic :: Internet
|
||||
|
|
2
setup.py
2
setup.py
|
@ -1,7 +1,7 @@
|
|||
from setuptools import setup
|
||||
|
||||
|
||||
def local_scheme(version) -> str:
|
||||
def local_scheme(version: str) -> str:
|
||||
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
|
||||
to be able to upload to Test PyPI"""
|
||||
return ""
|
||||
|
|
|
@ -110,13 +110,13 @@ class TestPyLastTrack(TestPyLastWithLastFm):
|
|||
|
||||
def test_track_get_duration(self) -> None:
|
||||
# Arrange
|
||||
track = pylast.Track("Cher", "Believe", self.network)
|
||||
track = pylast.Track("Radiohead", "Creep", self.network)
|
||||
|
||||
# Act
|
||||
duration = track.get_duration()
|
||||
|
||||
# Assert
|
||||
assert duration >= 200000
|
||||
assert duration >= 100000
|
||||
|
||||
def test_track_get_album(self) -> None:
|
||||
# Arrange
|
||||
|
|
Loading…
Reference in a new issue