Enhance README with real-world use case for Plex Media Server optimiz… #51
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 Build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| test-build: | |
| name: Test Build ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies and run tests with coverage | |
| run: make coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Install PyInstaller for build test | |
| shell: bash | |
| run: | | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| .venv/Scripts/python.exe -m pip install pyinstaller | |
| else | |
| .venv/bin/python -m pip install pyinstaller | |
| fi | |
| - name: Test PyInstaller build | |
| shell: bash | |
| run: | | |
| # Set platform-specific variables for testing | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| export OS="Windows_NT" | |
| else | |
| export OS="Linux" | |
| fi | |
| # Test that build command works | |
| make build | |
| # Test that the binary was created | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| test -f dist/imgc.exe | |
| ./dist/imgc.exe --help | |
| else | |
| test -f dist/imgc | |
| chmod +x dist/imgc | |
| ./dist/imgc --help | |
| fi | |
| - name: Upload test artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-build-${{ matrix.os }} | |
| path: dist/ | |
| retention-days: 1 |