Skip to content

Global refactoring

Global refactoring #10

name: Docker Build
on:
pull_request:
branches: ['master']
paths:
- '**.py'
- 'Dockerfile'
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v2
- name: Build Docker image
run: docker build -t stable-diffusion:pr .
# cpu-only tests on github runner, override entrypoint while mounting whole repo
# TODO: consider artifacts or git lfs to avoid downloading models for testing
- name: Run Tests
run: docker run --entrypoint bash --rm -v .:/app2 stable-diffusion:pr -c 'cd /app2 && python3 -m pip install pytest && python3 -m pytest -v tests/'