chore: bump deps #223
Workflow file for this run
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
| # This workflow builds the package, installs it, and tests basic functionality | |
| name: Build and Test Package | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| test-build-package: | |
| name: Test package build | |
| runs-on: ubuntu-latest | |
| if: "!startsWith(github.event.head_commit.message, 'bump:')" | |
| env: | |
| PYTHON_VERSION: 3.13 | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4 | |
| - name: Build the package | |
| run: uv build --python $PYTHON_VERSION | |
| - name: List built artifacts | |
| run: ls -la dist/ | |
| - name: Install the built wheel | |
| run: | | |
| uv venv --python $PYTHON_VERSION | |
| # Find the wheel file and install it | |
| WHEEL_FILE=$(ls dist/*.whl | head -1) | |
| echo "Installing wheel: $WHEEL_FILE" | |
| uv pip install "$WHEEL_FILE" | |
| - name: Test --version flag | |
| run: | | |
| # Test that the CLI is available and --version works | |
| uv run lightman-ai --version | |
| should-test-docker-build: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| name: Check if should `test_docker_build` run | |
| runs-on: ubuntu-latest | |
| if: "!startsWith(github.event.head_commit.message, 'bump:')" | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Check if Dockerfile changed | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: docker-changes | |
| with: | |
| filters: | | |
| docker: | |
| - 'Dockerfile' | |
| - '.dockerignore' | |
| workflow: | |
| - ./.github/actions/docker-build/action.yml | |
| outputs: | |
| docker: ${{ steps.docker-changes.outputs.docker }} | |
| workflow: ${{ steps.docker-changes.outputs.workflow }} | |
| test-docker-build: | |
| needs: [should-test-docker-build] | |
| name: Test Docker build | |
| runs-on: ubuntu-latest | |
| if: (needs.should-test-docker-build.outputs.workflow == 'true' || needs.should-test-docker-build.outputs.docker == 'true') && !startsWith(github.event.head_commit.message, 'bump:') | |
| permissions: | |
| contents: read | |
| packages: read | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build image | |
| uses: ./.github/actions/docker-build | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: false | |
| platforms: linux/amd64,linux/arm64 | |
| cache-from: type=registry,ref=ghcr.io/elementsinteractive/lightman-ai:buildcache |