mirror of
https://github.com/e1ven/Robohash.git
synced 2025-06-23 21:35:02 +00:00

Some users have asked for an updated version in PyPI, so I'm doing some minor cleanup. No real functionality changes, just modernizing things that would be considered more standard 10+ years after this code was written. - Added note about maintenance mode in README - Cleaned up Python 3 compatibility (removed Python 2 support) - Added minimal test for image consistency - Added Docker image + GitHub workflow to build/publish it - Fixed some minor bugs and improved error handling - Added better CLI help text The project is now officially in maintenance mode as noted in the README.
44 lines
912 B
YAML
44 lines
912 B
YAML
name: Robohash Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, main ]
|
|
pull_request:
|
|
branches: [ master, main ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build and run Docker container
|
|
run: |
|
|
docker build -t robohash:test .
|
|
docker run --name robohash-test -d robohash:test
|
|
# Wait for container to start
|
|
sleep 5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pillow
|
|
|
|
- name: Install the package
|
|
run: |
|
|
pip install -e .
|
|
|
|
- name: Run consistency tests
|
|
run: |
|
|
python tests/test_image_consistency.py
|
|
|
|
- name: Clean up
|
|
run: |
|
|
docker stop robohash-test || true
|
|
docker rm robohash-test || true |