fix(ci): resolve pytest tmp_path errors, cross-platform config path, … #19
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
| name: test | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit: | |
| name: ${{ matrix.os }} / Python ${{ matrix.python }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - run: python -m pip install -e ".[dev]" | |
| - run: python -c "import os; os.makedirs('.pytest-tmp', exist_ok=True)" && python -m pytest -m "not integration" --basetemp .pytest-tmp/unit -o cache_dir=.pytest-tmp/cache | |
| quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - run: python -m pip install -e ".[dev]" | |
| - run: python -m ruff check plexmuxy plexmuxy_gui tests | |
| - run: python -m mypy plexmuxy plexmuxy_gui | |
| - run: python -c "import os; os.makedirs('.pytest-tmp', exist_ok=True)" && python -m pytest -m "not integration" --basetemp .pytest-tmp/coverage -o cache_dir=.pytest-tmp/cache --cov --cov-report=term --cov-fail-under=75 | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - run: python -m pip install build | |
| - run: python -m build | |
| - name: Test wheel in a clean environment | |
| run: | | |
| python -m venv /tmp/plexmuxy-wheel-test | |
| /tmp/plexmuxy-wheel-test/bin/pip install dist/*.whl | |
| cd /tmp | |
| /tmp/plexmuxy-wheel-test/bin/plexmuxy --help | |
| /tmp/plexmuxy-wheel-test/bin/plexmuxy show-config | |
| /tmp/plexmuxy-wheel-test/bin/python -m plexmuxy --help |