⬆️ Update music-assistant-models to 1.1.207 #480
This file contains hidden or 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 workflow will install Python dependencies, run tests and lint | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| workflow-pins: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code from GitHub | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Validate pinned GitHub Actions | |
| run: | | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| import re | |
| import sys | |
| files = set() | |
| for root in (Path(".github/workflows"), Path(".github")): | |
| if root.exists(): | |
| files.update(path for path in root.rglob("*.yml") if path.is_file()) | |
| files.update(path for path in root.rglob("*.yaml") if path.is_file()) | |
| pattern = re.compile(r"^\s*(?:-\s*)?uses:\s*([^#\s]+)(?:\s+#\s*(.+))?$") | |
| failures = [] | |
| for path in sorted(files): | |
| for lineno, line in enumerate(path.read_text().splitlines(), 1): | |
| match = pattern.match(line) | |
| if not match: | |
| continue | |
| uses = match.group(1) | |
| if uses.startswith("./") or uses.startswith("../") or uses.startswith("docker://"): | |
| continue | |
| if "@" not in uses: | |
| failures.append(f"{path}:{lineno}: external action is not pinned: {uses}") | |
| continue | |
| ref = uses.rsplit("@", 1)[1] | |
| if not re.fullmatch(r"[0-9a-f]{40}", ref): | |
| failures.append(f"{path}:{lineno}: external action ref is not a full SHA: {uses}") | |
| continue | |
| comment = match.group(2) or "" | |
| if not re.search(r"\bv\d", comment): | |
| failures.append(f"{path}:{lineno}: SHA pin is missing a version comment: {uses}") | |
| if failures: | |
| print("\n".join(failures)) | |
| sys.exit(1) | |
| PY | |
| lint: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - name: Check out code from GitHub | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip build setuptools | |
| pip install . .[test] | |
| - name: Lint/test with pre-commit | |
| run: SKIP=no-commit-to-branch pre-commit run --all-files |