object ids #152
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: Run Tests and Check Formatting | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.11'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Linux/macOS - Install dependencies | |
| - name: Install dependencies (Linux/macOS) | |
| if: runner.os != 'Windows' # Only run on Linux/macOS | |
| env: | |
| PYTHONIOENCODING: utf-8 # Ensure Python uses UTF-8 encoding | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[test] | |
| shell: bash | |
| # Install FFmpeg on Ubuntu | |
| - name: Install FFmpeg (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| shell: bash | |
| # Install FFmpeg on macOS | |
| - name: Install FFmpeg (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install ffmpeg | |
| shell: bash | |
| # Install FFmpeg on Windows | |
| - name: Install FFmpeg (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| choco install ffmpeg -y | |
| shell: pwsh | |
| # Windows - Install dependencies | |
| - name: Install dependencies (Windows) | |
| if: runner.os == 'Windows' # Only run on Windows | |
| env: | |
| PYTHONIOENCODING: utf-8 # Ensure Python uses UTF-8 encoding | |
| PYTHONUTF8: 1 # Force Python to use UTF-8 mode | |
| run: | | |
| chcp 65001 # Change code page to UTF-8 | |
| python -m pip install --upgrade pip setuptools | |
| python -m pip install -e .[test] | |
| shell: pwsh | |
| - name: Code formatting | |
| run: | | |
| pip install "black[jupyter]==24.4.2" | |
| black --check . | |
| - name: Test with pytest | |
| run: | | |
| pytest --color=yes |