mirror of
https://github.com/beetbox/beets.git
synced 2026-01-14 04:01:43 +01:00
Simplify workflow
This commit is contained in:
parent
f3c9f03d71
commit
6d7a6df2fa
1 changed files with 13 additions and 38 deletions
51
.github/workflows/lint.yml
vendored
51
.github/workflows/lint.yml
vendored
|
|
@ -35,11 +35,9 @@ jobs:
|
|||
files: |
|
||||
**.py
|
||||
|
||||
format:
|
||||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
python-setup:
|
||||
runs-on: ubuntu-latest
|
||||
name: Check formatting
|
||||
needs: changed-files
|
||||
name: Setup python and poetry
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Python tools
|
||||
|
|
@ -49,8 +47,15 @@ jobs:
|
|||
cache: poetry
|
||||
- uses: abatilo/actions-poetry@v2
|
||||
- name: Install dependencies
|
||||
run: poetry install --only=format
|
||||
run: poetry install --all-extras
|
||||
|
||||
|
||||
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:
|
||||
|
|
@ -61,18 +66,8 @@ jobs:
|
|||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check linting
|
||||
needs: changed-files
|
||||
needs: [changed-files, python-setup]
|
||||
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:
|
||||
|
|
@ -83,18 +78,8 @@ jobs:
|
|||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check types with mypy
|
||||
needs: changed-files
|
||||
needs: [changed-files, python-setup]
|
||||
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
|
||||
|
|
@ -106,18 +91,8 @@ jobs:
|
|||
if: needs.changed-files.outputs.any_docs_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
name: Check docs
|
||||
needs: changed-files
|
||||
needs: [changed-files, python-setup]
|
||||
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