Fix ci #3
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-check: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_PLATFORM: linux/amd64 | |
| DOCKER_USER_HOME: /home/developer | |
| JUPYTER_TOKEN: ci | |
| OPENAI_API_KEY: "" | |
| GEMINI_API_KEY: "" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Export runner UID/GID for Docker build args | |
| run: | | |
| echo "DOCKER_HOST_UID=$(id -u)" >> "$GITHUB_ENV" | |
| echo "DOCKER_HOST_GID=$(id -g)" >> "$GITHUB_ENV" | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build dev and app images | |
| run: docker compose build dev app | |
| - name: Ruff lint | |
| run: docker compose run --rm -e RUFF_CACHE_DIR=/tmp/ruff-cache dev ruff check . | |
| - name: Ruff format check | |
| run: docker compose run --rm -e RUFF_CACHE_DIR=/tmp/ruff-cache dev ruff format --check . | |
| - name: Run tests | |
| run: docker compose run --rm -e PYTHONDONTWRITEBYTECODE=1 dev pytest -q -o cache_dir=/tmp/pytest-cache |