-
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.
- Loading branch information
Showing
4 changed files
with
53 additions
and
42 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -15,51 +15,37 @@ jobs: | |
platform: [ubuntu-latest, windows-latest] | ||
python-version: ["3.8", "3.9"] | ||
runs-on: ${{ matrix.platform }} | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python tools | ||
uses: BrandonLWhite/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
|
||
- name: Install base dependencies | ||
run: | | ||
pip install poetry | ||
poetry install | ||
- name: Install linux dependencies | ||
if: matrix.platform != 'windows-latest' | ||
- name: Install PyGobject dependencies | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: | | ||
sudo apt update | ||
sudo apt install ffmpeg gobject-introspection libgirepository1.0-dev | ||
poetry install --extras replaygain | ||
- name: Test the code | ||
- name: Install Python dependencies | ||
run: poetry install --only=main,test | ||
|
||
- if: ${{ ! (matrix.python-version == env.PYTHON_VERSION && matrix.platform == 'ubuntu-latest') }} | ||
name: Test without coverage | ||
run: poe test --no-cov | ||
|
||
- if: matrix.python-version == env.PYTHON_VERSION && matrix.platform == 'ubuntu-latest' | ||
name: Test with coverage | ||
uses: liskin/gh-problem-matcher-wrap@v2 | ||
with: | ||
linters: pytest | ||
run: poetry run project test | ||
run: poe test | ||
|
||
- name: Upload code coverage | ||
if: matrix.python-version == ${{ env.PYTHON_VERSION }} && matrix.platform == 'ubuntu-latest' | ||
- if: matrix.python-version == env.PYTHON_VERSION && matrix.platform == 'ubuntu-latest' | ||
name: Upload code coverage | ||
continue-on-error: true | ||
run: poetry run codecov | ||
|
||
test-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- uses: snok/install-poetry@v1 | ||
|
||
- name: Install docs dependencies | ||
run: poetry install --with=docs | ||
|
||
- uses: sphinx-doc/github-problem-matcher@master | ||
|
||
- name: Build docs | ||
run: poetry run project docs |
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
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 |
---|---|---|
|
@@ -14,37 +14,58 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python tools | ||
uses: BrandonLWhite/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- uses: snok/install-poetry@v1 | ||
cache: poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install --with=lint | ||
run: poetry install --only=main,lint | ||
|
||
- name: Lint code | ||
uses: liskin/gh-problem-matcher-wrap@v2 | ||
with: | ||
linters: flake8, isort | ||
run: | | ||
poetry run isort --check --diff beets beetsplug test | ||
poetry run flake8 . | ||
run: poe lint | ||
|
||
typing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python tools | ||
uses: BrandonLWhite/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- uses: snok/install-poetry@v1 | ||
cache: poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install --with=typing | ||
run: poetry install --only=main,typing | ||
|
||
- name: Type check code | ||
uses: liskin/gh-problem-matcher-wrap@v2 | ||
continue-on-error: true | ||
with: | ||
linters: mypy | ||
run: poetry run mypy --show-column-numbers --no-error-summary | ||
run: poe check-types --show-column-numbers --no-error-summary | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python tools | ||
uses: BrandonLWhite/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install --only=main,docs | ||
|
||
- uses: sphinx-doc/github-problem-matcher@master | ||
name: Build docs | ||
with: | ||
run: poe docs |
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