Merge pull request #119 from geigerzaehler/update-macos-ci-image #317
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
name: Check and test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: | |
- "3.10" # minimum required | |
- "3.13" # latest | |
include: | |
- python-version: "3.10" | |
os: windows-latest | |
- python-version: "3.10" | |
os: macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
pipx environment --value PIPX_BIN_DIR >> "$GITHUB_PATH" | |
pipx install poetry | |
- uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: poetry | |
- run: poetry env use ${{ steps.setup-python.outputs.python-path }} | |
- run: poetry install | |
- run: poetry run ruff format --check | |
- run: poetry run ruff check | |
- run: poetry run pyright --warnings | |
- run: sudo apt-get install -y imagemagick | |
if: runner.os == 'Linux' | |
- run: poetry run pytest | |
- run: poetry run coverage xml | |
- uses: coverallsapp/github-action@v2 | |
if: > | |
(github.event_name == 'pull_request' || github.ref_name == 'main') && | |
matrix.python-version == '3.10' && | |
matrix.os == 'ubuntu-latest' | |
with: | |
# Ignore .coverage, which has limited support from coveralls | |
file: coverage.xml | |
build-beets-versions: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
beets: | |
- "git+https://github.com/beetbox/beets#master" | |
- "beets==1.6.1" | |
continue-on-error: ${{ contains(matrix.beets, 'master') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: poetry | |
- run: poetry env use "$(which python)" | |
- run: poetry install | |
- run: poetry add ${{ matrix.beets }} | |
- run: poetry run pyright --warnings | |
- run: sudo apt-get install -y imagemagick | |
- run: poetry run pytest |