-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pr-fix-convert-not-mediafile
- Loading branch information
Showing
125 changed files
with
4,903 additions
and
1,958 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
{ | ||
"problemMatcher": [ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "sphinx", | ||
"pattern": [ | ||
{ | ||
"owner": "sphinx", | ||
"pattern": [ | ||
{ | ||
"regexp": "^Warning, treated as error:$" | ||
}, | ||
{ | ||
"regexp": "^(.*?):(\\d+):(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"message": 3 | ||
} | ||
] | ||
"regexp": "^([^:]+):(\\d+): (WARNING: )?(.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"message": 4 | ||
} | ||
] | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
name: Verify changelog updated | ||
|
||
on: | ||
pull_request: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- ready_for_review | ||
|
||
|
||
jobs: | ||
check_changes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get all updated Python files | ||
id: changed-python-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
fetch-depth: 0 | ||
files: | | ||
**.py | ||
- name: Get changed files | ||
id: getfile | ||
run: | | ||
echo "Files changed:" | ||
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) | ||
echo "$CHANGED_FILES" | ||
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV | ||
echo "$CHANGED_FILES" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Check for the changelog update | ||
id: changelog-update | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: docs/changelog.rst | ||
|
||
- name: Comment PR | ||
- name: Comment under the PR with a reminder | ||
if: steps.changed-python-files.outputs.any_changed == 'true' && steps.changelog-update.outputs.any_changed == 'false' | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: 'Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.' | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
if: contains(env.CHANGED_FILES, '.py') && !contains(env.CHANGED_FILES, 'changelog.rst') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,78 @@ | ||
name: ci | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
env: | ||
PY_COLORS: 1 | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.platform }} | ||
name: Run tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, windows-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.x'] | ||
|
||
python-version: ["3.8", "3.9"] | ||
runs-on: ${{ matrix.platform }} | ||
env: | ||
PY_COLORS: 1 | ||
|
||
IS_MAIN_PYTHON: ${{ matrix.python-version == '3.8' && matrix.platform == 'ubuntu-latest' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Install Python tools | ||
uses: BrandonLWhite/[email protected] | ||
- name: Setup Python with poetry caching | ||
# poetry cache requires poetry to already be installed, weirdly | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
|
||
# tox fails on Windows if version > 3.8.3 | ||
- name: Install base dependencies - Windows | ||
if: matrix.platform == 'windows-latest' | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox==3.8.3 sphinx | ||
- name: Install base dependencies - Ubuntu | ||
if: matrix.platform != 'windows-latest' | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox sphinx | ||
- name: Install optional dependencies | ||
if: matrix.platform != 'windows-latest' | ||
- name: Install PyGobject dependencies on Ubuntu | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: | | ||
sudo apt update | ||
sudo apt install ffmpeg # For replaygain | ||
sudo apt install ffmpeg gobject-introspection libgirepository1.0-dev | ||
poetry install --extras replaygain | ||
- name: Test older Python versions with tox | ||
if: matrix.python-version != '3.x' | ||
run: | | ||
tox -e py-test | ||
- name: Install Python dependencies | ||
run: poetry install --only=main,test | ||
|
||
- name: Test latest Python version with tox and get coverage | ||
if: matrix.python-version == '3.x' | ||
run: | | ||
tox -vv -e py-cov | ||
- name: Test latest Python version with tox and mypy | ||
if: matrix.python-version == '3.x' | ||
# continue-on-error is not ideal since it doesn't give a visible | ||
# warning, but there doesn't seem to be anything better: | ||
# https://github.com/actions/toolkit/issues/399 | ||
continue-on-error: true | ||
run: | | ||
tox -vv -e py-mypy | ||
- if: ${{ env.IS_MAIN_PYTHON != 'true' }} | ||
name: Test without coverage | ||
run: poe test | ||
|
||
- name: Upload code coverage | ||
if: matrix.python-version == '3.x' | ||
run: | | ||
pip install codecov || true | ||
codecov || true | ||
test-docs: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PY_COLORS: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
- if: ${{ env.IS_MAIN_PYTHON == 'true' }} | ||
name: Test with coverage | ||
uses: liskin/gh-problem-matcher-wrap@v3 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install base dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox sphinx | ||
- name: Add problem matcher | ||
run: echo "::add-matcher::.github/sphinx-problem-matcher.json" | ||
linters: pytest | ||
run: poe test-with-coverage | ||
|
||
- name: Build and check docs using tox | ||
run: tox -e docs | ||
- if: ${{ env.IS_MAIN_PYTHON == 'true' }} | ||
name: Store the coverage report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report | ||
path: .reports/coverage.xml | ||
|
||
lint: | ||
upload-coverage: | ||
name: Upload coverage report | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
- name: Get the coverage report | ||
uses: actions/download-artifact@v4 | ||
with: | ||
python-version: '3.x' | ||
name: coverage-report | ||
|
||
- name: Install base dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox sphinx | ||
- name: Add problem matcher | ||
run: echo "::add-matcher::.github/flake8-problem-matcher.json" | ||
|
||
- name: Lint with flake8 | ||
run: tox -e py-lint | ||
- name: Upload code coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./coverage.xml | ||
use_oidc: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,29 @@ name: integration tests | |
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * SUN' # run every Sunday at midnight | ||
- cron: "0 0 * * SUN" # run every Sunday at midnight | ||
jobs: | ||
test_integration: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PY_COLORS: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up latest Python version | ||
uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Install Python tools | ||
uses: BrandonLWhite/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9-dev | ||
python-version: 3.8 | ||
cache: poetry | ||
|
||
- name: Install base dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox sphinx | ||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Test with tox | ||
run: | | ||
tox -e int | ||
- name: Test | ||
env: | ||
INTEGRATION_TEST: 1 | ||
run: poe test | ||
|
||
- name: Check external links in docs | ||
run: | | ||
tox -e links | ||
run: poe check-docs-links | ||
|
||
- name: Notify on failure | ||
if: ${{ failure() }} | ||
|
Oops, something went wrong.