chore: test run in CI and see how it goes #231
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| ubuntu-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Setup Python 3.14 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.14 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Sync Python dependencies | |
| run: uv sync --dev | |
| - name: Setup OpenGL and Run Tests | |
| uses: edayot/model_resolver@master | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GIT_HASH: ${{ github.sha }} | |
| with: | |
| commands: | | |
| uv run pytest | |
| - name: Upload dist folder | |
| run: tar -czvf dist-ubuntu.tar.gz dist/ | |
| - name: Upload compressed dist folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-ubuntu | |
| path: dist-ubuntu.tar.gz | |
| windows-tests: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Setup Python 3.14 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.14 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Sync Python dependencies | |
| run: uv sync --dev | |
| - uses: ssciwr/setup-mesa-dist-win@v2 | |
| - name: Setup OpenGL and Run Tests | |
| uses: edayot/model_resolver@master | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GIT_HASH: ${{ github.sha }} | |
| with: | |
| commands: | | |
| uv run pytest | |
| - name: Upload dist folder | |
| run: Compress-Archive -Path dist\* -DestinationPath dist-windows.zip | |
| - name: Upload compressed dist folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-windows | |
| path: dist-windows.zip | |
| # macos-tests: | |
| # runs-on: macos-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v2 | |
| # with: | |
| # fetch-depth: 0 | |
| # - name: Setup Python 3.14 | |
| # uses: actions/setup-python@v2 | |
| # with: | |
| # python-version: 3.14 | |
| # - name: Install uv | |
| # uses: astral-sh/setup-uv@v7 | |
| # with: | |
| # enable-cache: true | |
| # - name: Sync Python dependencies | |
| # run: uv sync --dev | |
| # - name: Setup OpenGL (macOS) | |
| # run: | | |
| # # macOS comes with OpenGL support built-in. | |
| # # Optionally install freeglut if your project requires it. | |
| # brew update | |
| # brew install freeglut | |
| # brew install --cask xquartz | |
| # export DYLD_LIBRARY_PATH="$(brew --prefix freeglut)/lib:$DYLD_LIBRARY_PATH" | |
| # sleep 2 | |
| # export DISPLAY=:0 | |
| # export LIBGL_ALWAYS_SOFTWARE=1 | |
| # export SDL_VIDEODRIVER=dummy | |
| # cd examples/all_white | |
| # uv run beet | |
| # cd ../.. | |
| # - name: Upload dist folder | |
| # run: tar -czvf dist-macos.tar.gz dist/ | |
| # - name: Upload compressed dist folder | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: dist-macos | |
| # path: dist-macos.tar.gz |