Skip to content

Commit 59aaabf

Browse files
Create test_pypi.yml
1 parent 247a545 commit 59aaabf

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/test_pypi.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test PyPI Install
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Allows you to run this workflow manually from the Actions tab only
6+
workflow_dispatch:
7+
inputs:
8+
package_name:
9+
description: "Package to install from PyPI (raylib, raylib_sdl, raylib_drm, raylib_dynamic)"
10+
type: string
11+
required: true
12+
default: "raylib"
13+
14+
jobs:
15+
test-pypi-install:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [macos-15-intel, macos-14]
21+
python-version: ["3.14", "3.11", "3.12", "3.13"]
22+
steps:
23+
- name: Install Python from Homebrew
24+
run: |
25+
brew install python@${{ matrix.python-version }}
26+
PYTHON_BIN="$(brew --prefix python@${{ matrix.python-version }})/bin/python${{ matrix.python-version }}"
27+
echo "PYTHON_BIN=$PYTHON_BIN" >> "$GITHUB_ENV"
28+
$PYTHON_BIN --version
29+
30+
- name: Install package from PyPI
31+
run: |
32+
"$PYTHON_BIN" -m pip install --upgrade pip
33+
"$PYTHON_BIN" -m pip install "${{ inputs.package_name }}"
34+
35+
- name: Test import and basic initialization
36+
run: |
37+
cd /
38+
"$PYTHON_BIN" -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
39+
cat /tmp/output
40+
if grep -q "INFO: Initializing raylib" /tmp/output; then
41+
echo "Passed"
42+
exit 0
43+
else
44+
echo "Failed"
45+
exit 1
46+
fi
47+
shell: bash

0 commit comments

Comments
 (0)