mirror of
https://github.com/beetbox/beets.git
synced 2026-02-27 17:53:12 +01:00
Revert "Simplify workflow"
This reverts commit 4550d39d1e7833557e863de18163f5a4b80db977. I love this attempt to DRY-up the linting workflow! I remember back in the day also initially assuming that this is how the jobs work. However, I had to meet the harsh reality of each job needing to be set up from zero. :(
This commit is contained in:
parent
fee65baf32
commit
17ec5909ed
1 changed files with 38 additions and 13 deletions
51
.github/workflows/lint.yml
vendored
51
.github/workflows/lint.yml
vendored
|
|
@ -35,9 +35,11 @@ jobs:
|
|||
files: |
|
||||
**.py
|
||||
|
||||
python-setup:
|
||||
format:
|
||||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Setup python and poetry
|
||||
name: Check formatting
|
||||
needs: changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Python tools
|
||||
|
|
@ -47,15 +49,8 @@ jobs:
|
|||
cache: poetry
|
||||
- uses: abatilo/actions-poetry@v2
|
||||
- name: Install dependencies
|
||||
run: poetry install --all-extras
|
||||
|
||||
run: poetry install --only=format
|
||||
|
||||
format:
|
||||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check formatting
|
||||
needs: [changed-files, python-setup]
|
||||
steps:
|
||||
- name: Check code formatting
|
||||
uses: liskin/gh-problem-matcher-wrap@v3
|
||||
with:
|
||||
|
|
@ -66,8 +61,18 @@ jobs:
|
|||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check linting
|
||||
needs: [changed-files, python-setup]
|
||||
needs: changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Python tools
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: poetry
|
||||
- uses: abatilo/actions-poetry@v2
|
||||
- name: Install dependencies
|
||||
run: poetry install --only=lint
|
||||
|
||||
- name: Lint code
|
||||
uses: liskin/gh-problem-matcher-wrap@v3
|
||||
with:
|
||||
|
|
@ -78,8 +83,18 @@ jobs:
|
|||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check types with mypy
|
||||
needs: [changed-files, python-setup]
|
||||
needs: changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Python tools
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: poetry
|
||||
- uses: abatilo/actions-poetry@v2
|
||||
- name: Install dependencies
|
||||
run: poetry install --only=typing
|
||||
|
||||
- name: Type check code
|
||||
uses: liskin/gh-problem-matcher-wrap@v3
|
||||
continue-on-error: true
|
||||
|
|
@ -91,8 +106,18 @@ jobs:
|
|||
if: needs.changed-files.outputs.any_docs_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check docs
|
||||
needs: [changed-files, python-setup]
|
||||
needs: changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Python tools
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: poetry
|
||||
- uses: abatilo/actions-poetry@v2
|
||||
- name: Install dependencies
|
||||
run: poetry install --only=docs
|
||||
|
||||
- uses: sphinx-doc/github-problem-matcher@master
|
||||
name: Build docs
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue