Skip to content

Add CHANGELOG, LICENSE, README, setup.py, and GitHub workflows for im… #1

Add CHANGELOG, LICENSE, README, setup.py, and GitHub workflows for im…

Add CHANGELOG, LICENSE, README, setup.py, and GitHub workflows for im… #1

Workflow file for this run

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
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install pyinstaller
- name: Run tests
run: make test
- 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