test.yml
yml
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
No comments yet.