Run the container test in CI #1
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: configure-container example | |
on: | |
pull_request: | |
branches: ["*"] | |
jobs: | |
build: | |
name: Build and run all tests and checks | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./examples/configure-container | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: "3.10.8" | |
- uses: Gr1N/setup-poetry@v8 | |
name: Install poetry | |
with: | |
poetry-version: 1.7.1 | |
- name: Install python dependencies | |
run: make install | |
- name: Check types | |
run: make lint | |
- name: Check formatting | |
run: make format | |
# Complicted Docker logic to get around disk space issues on github builders | |
- name: Remove python dependencies to save space | |
if: ${{ inputs.type == 'llm' }} | |
run: | | |
rm -rf .venv/ | |
poetry cache clear PyPI --all | |
poetry cache clear torch --all | |
echo "Available storage:" | |
sudo df -h | |
echo | |
- name: Create docker dirs | |
run: mkdir -p ${{ inputs.workdir }}/llm/ && mkdir -p ${{ inputs.workdir }}/main/ | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker container | |
run: make build | |
- name: Run tests against container | |
run: make test |