Skip to content

Update beets to 2.9.0 (#95) #613

Update beets to 2.9.0 (#95)

Update beets to 2.9.0 (#95) #613

Workflow file for this run

name: Code quality
on: [push, pull_request_target]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
beets: ["1.5.0", "1.6.0", "2.0.0", "2.4.0", "2.9.0"]
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: poetry
- name: Install dependencies
run: |
poetry install
pip install beets==${{ matrix.beets }}
- name: Pytest
run: poetry run pytest -k 'not need_connection' --ignore-glob='*test_lib*'
- name: Upload coverage data to coveralls.io
uses: coverallsapp/github-action@v2
with:
file: .reports/coverage.xml
parallel: true
flag-name: python${{ matrix.python }}_beets${{ matrix.beets }}
- name: Lint ruff
run: poetry run ruff check --exit-zero --output-format=json --output-file=.reports/ruff.json .
- name: Lint mypy
run: poetry run mypy beetsplug beetcamp > .reports/mypy.log || true
- name: Set project version
run: echo PROJECT_VERSION="$(git describe --tags | sed 's/-[^-]*$//')" >> $GITHUB_ENV
- name: SonarCloud Scan
if: ${{ matrix.beets == '1.5.0' && matrix.python == '3.9' }}
uses: SonarSource/sonarqube-scan-action@v5
with:
args: >
-Dsonar.branch.name=${{ github.ref_name }}
-Dsonar.organization=snejus
-Dsonar.projectKey=snejus_beetcamp
-Dsonar.projectVersion=${{ env.PROJECT_VERSION }}
-Dsonar.coverage.exclusions=tests/*
-Dsonar.exclusions=tests/*
-Dsonar.python.coverage.reportPaths=.reports/coverage.xml
-Dsonar.python.ruff.reportPaths=.reports/ruff.json
-Dsonar.python.mypy.reportPaths=.reports/mypy.log
-Dsonar.python.version=3.9
-Dsonar.python.xunit.reportPath=.reports/test-report.xml
-Dsonar.sources=beetsplug/bandcamp,beetcamp
-Dsonar.tests=tests
-Dsonar.test.inclusions=tests/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true