From 827a0cbf61540d58c92ad5f563a6c0eac5a37959 Mon Sep 17 00:00:00 2001 From: Philip Montgomery <pmontgom@broadinstitute.org> Date: Wed, 8 Jan 2025 22:32:23 -0500 Subject: [PATCH] more debugging --- .../workflows/publish_breadbox_client.yaml | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish_breadbox_client.yaml b/.github/workflows/publish_breadbox_client.yaml index aae78ce7..a647ec02 100644 --- a/.github/workflows/publish_breadbox_client.yaml +++ b/.github/workflows/publish_breadbox_client.yaml @@ -8,6 +8,8 @@ on: description: "The tag/branch to checkout" required: true default: "master" +env: + POETRY_CACHE_DIR: "${{ env.HOME }}/.cache/pypoetry" jobs: publish-breadbox-client: runs-on: ubuntu-latest @@ -27,28 +29,36 @@ jobs: with: version: 1.7.1 virtualenvs-create: true - virtualenvs-in-project: true - name: Set up cache uses: actions/cache@v2 id: cached-poetry-dependencies with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} - - name: Generate breadbox client - uses: ./.github/actions/generate-breadbox-client # defined as a re-usable action - # the above does a checkout which deletes the credential file, so we need to execute authenticate to google cloud after it - - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v2 - with: - # See instructions here: https://github.com/google-github-actions/auth?tab=readme-ov-file#service-account-key-json - credentials_json: ${{ secrets.DEPMAP_ARTIFACTS_SVC_ACCT }} - - name: Set up for publishing breadbox client - working-directory: ./breadbox-client + path: "${{ env.POETRY_CACHE_DIR }}" + key: "breadbox-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('breadbox*/**/poetry.lock') }}" + + - name: "Install breadbox python dependencies" + working-directory: "./breadbox" + run: "poetry install" + + - name: "Install breadbox client generator dependencies" + working-directory: "./breadbox-client-generator" + run: "poetry install" + + - name: "Export the breadbox API spec" + working-directory: "./breadbox" + run: "poetry run ./bb update-client" + + - name: "peek at poetry cachedir" + run: "ls -l ${{ env.POETRY_CACHE_DIR }}/*" + + - name: "Set up for publishing breadbox client" + working-directory: "./breadbox-client" run: | + find ./breadbox_client poetry self add keyrings.google-artifactregistry-auth poetry config repositories.public-python https://us-central1-python.pkg.dev/cds-artifacts/public-python/ - - name: Publish new breadbox client version to Artifact Registry - working-directory: ./breadbox-client + + - name: "Publish new breadbox client version to Artifact Registry" + working-directory: "./breadbox-client" run: | - find ./breadbox_client poetry publish --build --repository public-python