CI #158
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: CI | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' # Run daily at midnight UTC | |
workflow_dispatch: # Allow manual trigger | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] # Disable CI in ubuntu and windows: https://github.com/RizwanMunawar/streamgrid/actions/runs/17341169990/job/49235228046 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install system dependencies (Ubuntu only) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 || sudo apt-get install -y libgl1 libglib2.0-0 | |
- name: Upgrade pip and install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest requests ultralytics opencv-python | |
pip install -e . # Install your local package | |
- name: Run tests | |
run: | | |
pytest tests/core.py |