Global refactoring #10
Workflow file for this run
This file contains 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: 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/' | |