Test ogx stack list-deps #1478
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
| name: Test ogx stack list-deps | |
| run-name: Test ogx stack list-deps | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/ogx/cli/stack/list_deps.py' | |
| - 'src/ogx/cli/stack/_list_deps.py' | |
| - 'src/ogx/core/build.*' | |
| - 'src/ogx/core/*.sh' | |
| - '.github/workflows/providers-list-deps.yml' | |
| - 'src/ogx/templates/**' | |
| - 'pyproject.toml' | |
| pull_request: | |
| paths: | |
| - 'src/ogx/cli/stack/list_deps.py' | |
| - 'src/ogx/cli/stack/_list_deps.py' | |
| - 'src/ogx/core/build.*' | |
| - 'src/ogx/core/*.sh' | |
| - '.github/workflows/providers-list-deps.yml' | |
| - 'src/ogx/templates/**' | |
| - 'pyproject.toml' | |
| merge_group: | |
| branches: | |
| - main | |
| - 'release-[0-9]+.[0-9]+.x' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| distros: ${{ steps.set-matrix.outputs.distros }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Generate Distribution List | |
| id: set-matrix | |
| run: | | |
| distros=$(find src/ogx/distributions -mindepth 1 -maxdepth 1 -type d 2>/dev/null | \ | |
| awk -F'/' '{print $NF}' | \ | |
| grep -v '^__pycache__$' | \ | |
| grep -v '^ci-tests$' | \ | |
| jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "distros=$distros" >> "$GITHUB_OUTPUT" | |
| list-deps: | |
| needs: generate-matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| distro: ${{ fromJson(needs.generate-matrix.outputs.distros) }} | |
| image-type: [venv, container] | |
| fail-fast: false # We want to run all jobs even if some fail | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-runner | |
| - name: Print dependencies | |
| run: | | |
| uv run ogx stack list-deps ${{ matrix.distro }} | |
| - name: Install Distro using ogx stack list-deps | |
| run: | | |
| # USE_COPY_NOT_MOUNT is set to true since mounting is not supported by docker buildx, we use COPY instead | |
| # OGX_DIR is set to the current directory so we are building from the source | |
| USE_COPY_NOT_MOUNT=true OGX_DIR=. uv run ogx stack list-deps ${{ matrix.distro }} | xargs -L1 uv pip install | |
| - name: Print dependencies in the image | |
| if: matrix.image-type == 'venv' | |
| run: | | |
| uv pip list | |
| show-single-provider: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-runner | |
| - name: Show a single provider | |
| run: | | |
| USE_COPY_NOT_MOUNT=true OGX_DIR=. uv run ogx stack list-deps --providers inference=remote::ollama | |
| list-deps-from-config: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-runner | |
| - name: list-des from Config | |
| env: | |
| USE_COPY_NOT_MOUNT: "true" | |
| OGX_DIR: "." | |
| run: | | |
| uv run ogx stack list-deps src/ogx/distributions/ci-tests/config.yaml |