From 034591a36aa54213aa77e28f5178532ef4b35d82 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 09:48:08 -0400 Subject: [PATCH 01/38] remove just package --- .github/workflows/contract.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index d2ee9be12..08607c2af 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -108,7 +108,7 @@ jobs: - run: echo "${FUZZBUCKET_SSH_KEY}" > test/fuzzbucket-ssh-key && chmod 600 test/fuzzbucket-ssh-key # vscode ui tests - - run: just package + # - run: just package - run: just vscode configure - run: just vscode-ui install From 4f1e973bfe00cbba758e8d1c49b57ca857849132 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 09:58:47 -0400 Subject: [PATCH 02/38] reuse package --- .github/workflows/contract.yaml | 4 ++++ .github/workflows/nightly.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 08607c2af..36b06c4c4 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -96,6 +96,10 @@ jobs: with: name: bin path: bin + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist - uses: actions/checkout@v4 with: repository: rstudio/connect-content diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index ee1dee783..77c220501 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -13,7 +13,7 @@ jobs: secrets: inherit uses: ./.github/workflows/contract-deps.yaml nightly: - needs: [build, contract-deps] + needs: [build, contract-deps, package] secrets: inherit uses: ./.github/workflows/contract.yaml cleanup: From aa0eecb99d78d1ccee53449632b724fa4f181592 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 10:23:15 -0400 Subject: [PATCH 03/38] upload dist --- .github/workflows/package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index a156138dc..bf0b3c847 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -19,4 +19,4 @@ jobs: id: upload with: name: dist - path: dist/**/* + path: dist From cba6250ac6393d0fe6d26580d309024bcd4746e5 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 10:37:09 -0400 Subject: [PATCH 04/38] tmate --- .github/workflows/contract.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 36b06c4c4..a97a216f4 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -129,3 +129,9 @@ jobs: env: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts WORKSPACE_PATH: ../sample-content/ + + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + with: + limit-access-to-actor: true From bc2646220257411dcc5a394801e080c204c64f38 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 11:12:26 -0400 Subject: [PATCH 05/38] run vscode-ui tests in CI --- .github/workflows/contract.yaml | 12 ++++++------ .github/workflows/main.yaml | 12 ++++++++---- .github/workflows/nightly.yaml | 6 +----- .github/workflows/package.yaml | 2 +- .github/workflows/vscode-ui.yaml | 4 ++++ 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index a97a216f4..6a1cd04de 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -112,7 +112,7 @@ jobs: - run: echo "${FUZZBUCKET_SSH_KEY}" > test/fuzzbucket-ssh-key && chmod 600 test/fuzzbucket-ssh-key # vscode ui tests - # - run: just package + - run: just package - run: just vscode configure - run: just vscode-ui install @@ -130,8 +130,8 @@ jobs: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts WORKSPACE_PATH: ../sample-content/ - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true + # - name: Setup tmate session + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7b7803077..050a0f223 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,16 +14,15 @@ jobs: # Build build: uses: ./.github/workflows/build.yaml - package: - needs: build - uses: ./.github/workflows/package.yaml + # package: + # needs: build + # uses: ./.github/workflows/package.yaml archive: needs: build uses: ./.github/workflows/archive.yaml upload: needs: - archive - - package uses: ./.github/workflows/upload.yaml secrets: inherit @@ -32,3 +31,8 @@ jobs: needs: build secrets: inherit uses: ./.github/workflows/bats.yaml + + vscode-ui: + needs: build + secrets: inherit + uses: ./.github/workflows/vscode-ui.yaml diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 77c220501..9308c7f8e 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -13,23 +13,19 @@ jobs: secrets: inherit uses: ./.github/workflows/contract-deps.yaml nightly: - needs: [build, contract-deps, package] + needs: [build, contract-deps] secrets: inherit uses: ./.github/workflows/contract.yaml cleanup: needs: nightly secrets: inherit uses: ./.github/workflows/cleanup.yaml - package: - needs: build - uses: ./.github/workflows/package.yaml archive: needs: build uses: ./.github/workflows/archive.yaml upload: needs: - archive - - package uses: ./.github/workflows/upload.yaml with: nightly: true diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index bf0b3c847..a156138dc 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -19,4 +19,4 @@ jobs: id: upload with: name: dist - path: dist + path: dist/**/* diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index bca368a64..6e135eec5 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -48,6 +48,10 @@ jobs: - run: just vscode configure - run: just vscode-ui install - run: just vscode-ui test + env: + SPEC_PATH: ./test/specs/nested-fastapi.spec.ts + WORKSPACE_PATH: ../sample-content/ + DOCKER_CONNECT: true - name: Save screenshots uses: actions/upload-artifact@v4 From 44c68866d6327daae01ca0c1e16b4715ce73620a Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 11:17:24 -0400 Subject: [PATCH 06/38] add vscode-ui tests to pr --- .github/workflows/pull-request.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 49b955870..b464906f1 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -20,16 +20,12 @@ jobs: # Build build: uses: ./.github/workflows/build.yaml - package: - needs: build - uses: ./.github/workflows/package.yaml archive: needs: build uses: ./.github/workflows/archive.yaml upload: needs: - archive - - package uses: ./.github/workflows/upload.yaml secrets: inherit @@ -40,7 +36,7 @@ jobs: uses: ./.github/workflows/bats.yaml # disable the vscode-ui tests for now - # vscode-ui: - # needs: build - # secrets: inherit - # uses: ./.github/workflows/vscode-ui.yaml + vscode-ui: + needs: build + secrets: inherit + uses: ./.github/workflows/vscode-ui.yaml From 227d577778c9c1d0dd5a8aa6526620518fe078ee Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 11:18:50 -0400 Subject: [PATCH 07/38] remove download artifact --- .github/workflows/contract.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 6a1cd04de..5993bff22 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -96,10 +96,6 @@ jobs: with: name: bin path: bin - - uses: actions/download-artifact@v4 - with: - name: dist - path: dist - uses: actions/checkout@v4 with: repository: rstudio/connect-content From 195ccc3b959f3d6b1533e384efca14d70cd59136 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 11:42:10 -0400 Subject: [PATCH 08/38] remove node install --- .github/workflows/pull-request.yaml | 1 + .github/workflows/vscode-ui.yaml | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index b464906f1..c485ab3d4 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -26,6 +26,7 @@ jobs: upload: needs: - archive + - vscode-ui uses: ./.github/workflows/upload.yaml secrets: inherit diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 6e135eec5..55dafeee4 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -6,11 +6,9 @@ env: jobs: native: env: - DOCKER: false DOCKER_CONNECT: true - # deploy only these content - CONTENT: "fastapi-simple quarto-website-py" CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} + CI: true strategy: fail-fast: false matrix: @@ -22,19 +20,9 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup - uses: extractions/setup-just@v2 - - uses: actions/setup-node@v4 - with: - node-version: 20.x - - uses: actions/checkout@v4 - with: - repository: rstudio/connect-content - path: "test/content" - sparse-checkout: bundles - sparse-checkout-cone-mode: false - token: ${{ secrets.CONNECT_PAT }} - uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.12 - uses: quarto-dev/quarto-actions/setup@v2 with: version: 1.4.549 @@ -51,7 +39,12 @@ jobs: env: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts WORKSPACE_PATH: ../sample-content/ - DOCKER_CONNECT: true + + - uses: actions/upload-artifact@v4 + id: upload + with: + name: dist + path: dist/**/* - name: Save screenshots uses: actions/upload-artifact@v4 From cedb2aa41bd824971545aede7c1f81311bb22de5 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 16:01:50 -0400 Subject: [PATCH 09/38] migrate to Dockerfile for docker caching --- .github/workflows/vscode-ui.yaml | 9 +++++++++ test/scripts/test-runner.bash | 13 ++++++++++--- test/vscode-ui/justfile | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 55dafeee4..7e37694f7 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -46,6 +46,15 @@ jobs: name: dist path: dist/**/* + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./test/ + push: true + tags: "rstudio/rstudio-connect-preview:dev-jammy-daily" + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Save screenshots uses: actions/upload-artifact@v4 if: failure() diff --git a/test/scripts/test-runner.bash b/test/scripts/test-runner.bash index 95378bb26..fdc6f61a8 100755 --- a/test/scripts/test-runner.bash +++ b/test/scripts/test-runner.bash @@ -14,12 +14,19 @@ fi setup_connect() { pip install -r ../setup/requirements.txt if [[ "${DOCKER_CONNECT}" = true ]]; then - docker compose -f ../docker-compose.yml build - docker compose -f ../docker-compose.yml up -d + docker run -d \ + -e RSC_LICENSE="${CONNECT_LICENSE}" \ + -p 3939:3939 \ + --name connect \ + --privileged \ + --volume ${PWD}/../setup/rstudio-connect.gcfg:/etc/rstudio-connect/rstudio-connect.gcfg \ + --rm \ + rstudio/rstudio-connect-preview:dev-jammy-daily + export CONNECT_SERVER="http://localhost:3939" export CONNECT_API_KEY="$(python ../setup/gen_apikey.py 'admin')" # wait until Connect is available - timeout 100 bash -c \ + timeout 10 bash -c \ 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${CONNECT_SERVER}/__ping__)" != "200" ]]; \ do sleep 1; \ echo "retry"; \ diff --git a/test/vscode-ui/justfile b/test/vscode-ui/justfile index 1ca900e2e..4310e277b 100644 --- a/test/vscode-ui/justfile +++ b/test/vscode-ui/justfile @@ -67,4 +67,5 @@ test: #!/usr/bin/env bash set -eou pipefail {{ _with_debug }} + ../scripts/test-runner.bash vscode-ui \ No newline at end of file From 03bbac01691d8a09f00e7ee369ce8db1e16e1880 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 16:12:54 -0400 Subject: [PATCH 10/38] caching --- .github/workflows/bats.yaml | 14 +++++++++++++- .github/workflows/vscode-ui.yaml | 27 ++++++++++++++++----------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/workflows/bats.yaml b/.github/workflows/bats.yaml index e393914fb..3356fd0ea 100644 --- a/.github/workflows/bats.yaml +++ b/.github/workflows/bats.yaml @@ -8,7 +8,7 @@ jobs: # deploy only these content CONTENT: "fastapi-simple quarto-website-py" CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} - PYTHON_VERSION: 3.12.1 + PYTHON_VERSION: 3.12 QUARTO_VERSION: 1.4.549 strategy: fail-fast: false @@ -37,6 +37,18 @@ jobs: with: version: ${{ env.QUARTO_VERSION }} - uses: extractions/setup-just@v2 + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./test/ + push: true + tags: "rstudio/rstudio-connect-preview:dev-jammy-daily" + cache-from: type=gha + cache-to: type=gha,mode=max + build-args: | + QUARTO_VERSION=${{ env.QUARTO_VERSION }} + PYTHON_VERSION=${{ env.PYTHON_VERSION }} + - uses: actions/download-artifact@v4 with: name: bin diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 7e37694f7..af8c026bc 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -9,6 +9,8 @@ jobs: DOCKER_CONNECT: true CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} CI: true + QUARTO_VERSION: 1.4.549 + PYTHON_VERSION: 3.12 strategy: fail-fast: false matrix: @@ -20,12 +22,24 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup - uses: extractions/setup-just@v2 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./test/ + push: true + tags: "rstudio/rstudio-connect-preview:dev-jammy-daily" + cache-from: type=gha + cache-to: type=gha,mode=max + build-args: | + QUARTO_VERSION=${{ env.QUARTO_VERSION }} + PYTHON_VERSION=${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: ${{ env.PYTHON_VERSION }} - uses: quarto-dev/quarto-actions/setup@v2 with: - version: 1.4.549 + version: ${{ env.QUARTO_VERSION }} - uses: actions/download-artifact@v4 with: name: bin @@ -46,15 +60,6 @@ jobs: name: dist path: dist/**/* - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: ./test/ - push: true - tags: "rstudio/rstudio-connect-preview:dev-jammy-daily" - cache-from: type=gha - cache-to: type=gha,mode=max - - name: Save screenshots uses: actions/upload-artifact@v4 if: failure() From dd3b04b5a732fffd2bd8ce34b8ba3f8a42f90a16 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 16:18:25 -0400 Subject: [PATCH 11/38] add buildx --- .github/workflows/vscode-ui.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index af8c026bc..88d9cbe8a 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -23,6 +23,9 @@ jobs: - uses: ./.github/actions/setup - uses: extractions/setup-just@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push uses: docker/build-push-action@v6 with: From 824f33c7be9d0e3b51b9731c85ea028514a55ab7 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 16:31:19 -0400 Subject: [PATCH 12/38] untag --- .github/workflows/bats.yaml | 5 ++++- .github/workflows/vscode-ui.yaml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bats.yaml b/.github/workflows/bats.yaml index 3356fd0ea..7d004bd8e 100644 --- a/.github/workflows/bats.yaml +++ b/.github/workflows/bats.yaml @@ -37,12 +37,15 @@ jobs: with: version: ${{ env.QUARTO_VERSION }} - uses: extractions/setup-just@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push uses: docker/build-push-action@v6 with: context: ./test/ push: true - tags: "rstudio/rstudio-connect-preview:dev-jammy-daily" cache-from: type=gha cache-to: type=gha,mode=max build-args: | diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 88d9cbe8a..7c6e6b8c7 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -31,7 +31,6 @@ jobs: with: context: ./test/ push: true - tags: "rstudio/rstudio-connect-preview:dev-jammy-daily" cache-from: type=gha cache-to: type=gha,mode=max build-args: | From fdc5f313dce58fc5f485195cd6075ecb702218bd Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 18:30:40 -0400 Subject: [PATCH 13/38] remove bats tests from PR job --- .github/workflows/pull-request.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index c485ab3d4..b69d1c888 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -31,12 +31,6 @@ jobs: secrets: inherit # Integration Tests - bats: - needs: build - secrets: inherit - uses: ./.github/workflows/bats.yaml - - # disable the vscode-ui tests for now vscode-ui: needs: build secrets: inherit From 29db859fbcf9fc991059d1ebcf3c73a81aa91df1 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 18 Sep 2024 18:30:55 -0400 Subject: [PATCH 14/38] push false --- .github/workflows/vscode-ui.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 7c6e6b8c7..eb9fb8558 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -30,7 +30,7 @@ jobs: uses: docker/build-push-action@v6 with: context: ./test/ - push: true + push: false cache-from: type=gha cache-to: type=gha,mode=max build-args: | From 927f0de383a95183444cd76e03a471942b505420 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Thu, 19 Sep 2024 20:08:46 -0400 Subject: [PATCH 15/38] rm quarto for now --- .github/workflows/vscode-ui.yaml | 19 +++---------------- test/scripts/test-runner.bash | 11 ++--------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index f0ee90eb1..c750d3d38 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -23,25 +23,12 @@ jobs: - uses: ./.github/actions/setup - uses: extractions/setup-just@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: ./test/ - push: false - cache-from: type=gha - cache-to: type=gha,mode=max - build-args: | - QUARTO_VERSION=${{ env.QUARTO_VERSION }} - PYTHON_VERSION=${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} - - uses: quarto-dev/quarto-actions/setup@v2 - with: - version: ${{ env.QUARTO_VERSION }} + # - uses: quarto-dev/quarto-actions/setup@v2 + # with: + # version: ${{ env.QUARTO_VERSION }} - uses: actions/download-artifact@v4 with: name: bin diff --git a/test/scripts/test-runner.bash b/test/scripts/test-runner.bash index 5852ddddc..9628e20a2 100755 --- a/test/scripts/test-runner.bash +++ b/test/scripts/test-runner.bash @@ -14,15 +14,8 @@ fi setup_connect() { pip install -r ../setup/requirements.txt if [[ "${DOCKER_CONNECT}" = true ]]; then - docker run -d \ - -e RSC_LICENSE="${CONNECT_LICENSE}" \ - -p 3939:3939 \ - --name connect \ - --privileged \ - --volume ${PWD}/../setup/rstudio-connect.gcfg:/etc/rstudio-connect/rstudio-connect.gcfg \ - --rm \ - rstudio/rstudio-connect-preview:dev-jammy-daily - + docker compose -f ../docker-compose.yml build + docker compose -f ../docker-compose.yml up -d export CONNECT_SERVER="http://localhost:3939" export CONNECT_API_KEY="$(python ../setup/gen_apikey.py 'admin')" # wait until Connect is available From 3e55f4c11fdaf98d6c465f6c94b53aaf010b7d14 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Thu, 19 Sep 2024 20:25:41 -0400 Subject: [PATCH 16/38] update command --- .github/workflows/vscode-ui.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index c750d3d38..2f484fe27 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -38,7 +38,7 @@ jobs: - run: just package - run: just vscode configure - run: just vscode-ui install - - run: just vscode-ui vscode-nested + - run: just vscode-ui test vscode-nested env: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts WORKSPACE_PATH: ../sample-content/ From 41b2d53ca9d5888bb558fb541392a30e87d8a603 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Thu, 19 Sep 2024 20:34:21 -0400 Subject: [PATCH 17/38] use python 3.12.4 --- .github/workflows/vscode-ui.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 2f484fe27..3883ab7dd 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -10,7 +10,7 @@ jobs: CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} CI: true QUARTO_VERSION: 1.4.549 - PYTHON_VERSION: 3.12 + PYTHON_VERSION: 3.12.4 strategy: fail-fast: false matrix: From 45a67f4d2105239e45dbd70b72185099963ce25e Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Fri, 20 Sep 2024 11:51:47 -0400 Subject: [PATCH 18/38] prep for CI --- test/bats/justfile | 8 ++++++++ test/scripts/test-runner.bash | 1 - test/vscode-ui/justfile | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/bats/justfile b/test/bats/justfile index e83bfd75f..61b1b4321 100644 --- a/test/bats/justfile +++ b/test/bats/justfile @@ -24,6 +24,13 @@ default: just install just test +build-connect: + #!/usr/bin/env bash + set -eou pipefail + {{ _with_debug }} + + docker compose -f ../docker-compose.yml build + # Deletes ephemeral project files (i.e., cleans the project). clean: #!/usr/bin/env bash @@ -53,6 +60,7 @@ fuzzbucket-stop: pip install -r ../setup/requirements.txt fuzzbucket-client rm connect-publishing-client + # Executes commands via `npm`. Equivalent to `npm run`. Provides arbitrary command chaining inside of Docker from project root (i.e., `just bats run test`) run *args: #!/usr/bin/env bash diff --git a/test/scripts/test-runner.bash b/test/scripts/test-runner.bash index 9628e20a2..cd1b34b8d 100755 --- a/test/scripts/test-runner.bash +++ b/test/scripts/test-runner.bash @@ -14,7 +14,6 @@ fi setup_connect() { pip install -r ../setup/requirements.txt if [[ "${DOCKER_CONNECT}" = true ]]; then - docker compose -f ../docker-compose.yml build docker compose -f ../docker-compose.yml up -d export CONNECT_SERVER="http://localhost:3939" export CONNECT_API_KEY="$(python ../setup/gen_apikey.py 'admin')" diff --git a/test/vscode-ui/justfile b/test/vscode-ui/justfile index fd60692eb..e951e2399 100644 --- a/test/vscode-ui/justfile +++ b/test/vscode-ui/justfile @@ -31,7 +31,7 @@ build-connect: set -eou pipefail {{ _with_debug }} - docker compose build + docker compose -f ../docker-compose.yml build # Deletes ephemeral project files (i.e., cleans the project). clean: @@ -67,4 +67,5 @@ test *args: #!/usr/bin/env bash set -eou pipefail {{ _with_debug }} + ../scripts/test-runner.bash {{ args }} From 0e91e974da80dc1df8fe0f71ee8171b0f8fbe13c Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Fri, 20 Sep 2024 14:12:57 -0400 Subject: [PATCH 19/38] rename job --- .github/workflows/vscode-ui.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 3883ab7dd..4efd05ea9 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -4,7 +4,7 @@ on: env: VSCODE_VERSION: stable jobs: - native: + ui-tests: env: DOCKER_CONNECT: true CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} From e8299573e5a1c437567ae3fbc2849d2258446aa8 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Fri, 20 Sep 2024 14:29:54 -0400 Subject: [PATCH 20/38] build docker first --- .github/workflows/vscode-ui.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 4efd05ea9..b16be85a3 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -38,6 +38,7 @@ jobs: - run: just package - run: just vscode configure - run: just vscode-ui install + - run: just vscode-ui build-connect - run: just vscode-ui test vscode-nested env: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts From 0bb576e7fe1d6c512b9be5de8fbe51b70ea4df7f Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Fri, 20 Sep 2024 14:45:59 -0400 Subject: [PATCH 21/38] include bats --- .github/workflows/bats.yaml | 15 +-------------- .github/workflows/pull-request.yaml | 5 +++++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/bats.yaml b/.github/workflows/bats.yaml index 7d004bd8e..74861f411 100644 --- a/.github/workflows/bats.yaml +++ b/.github/workflows/bats.yaml @@ -38,20 +38,6 @@ jobs: version: ${{ env.QUARTO_VERSION }} - uses: extractions/setup-just@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: ./test/ - push: true - cache-from: type=gha - cache-to: type=gha,mode=max - build-args: | - QUARTO_VERSION=${{ env.QUARTO_VERSION }} - PYTHON_VERSION=${{ env.PYTHON_VERSION }} - - uses: actions/download-artifact@v4 with: name: bin @@ -60,5 +46,6 @@ jobs: - run: chmod -R +x ./bin - run: just bats install - run: just bats test common + - run: just bats build-connect - run: just bats test init - run: just bats test deploy diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index b69d1c888..2328e1cf0 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -31,6 +31,11 @@ jobs: secrets: inherit # Integration Tests + bats: + needs: build + secrets: inherit + uses: ./.github/workflows/bats.yaml + vscode-ui: needs: build secrets: inherit From f8e16b53d195721f439d073b38bce2b264b6ada8 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Fri, 20 Sep 2024 15:54:13 -0400 Subject: [PATCH 22/38] cleanup --- .github/workflows/main.yaml | 3 --- .github/workflows/vscode-ui.yaml | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 050a0f223..32ac23c79 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,9 +14,6 @@ jobs: # Build build: uses: ./.github/workflows/build.yaml - # package: - # needs: build - # uses: ./.github/workflows/package.yaml archive: needs: build uses: ./.github/workflows/archive.yaml diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index b16be85a3..156731228 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -26,6 +26,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} + # disabling quarto until we need it # - uses: quarto-dev/quarto-actions/setup@v2 # with: # version: ${{ env.QUARTO_VERSION }} From 5693e9cfc57318d013a19751b985c65218e2432f Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Mon, 23 Sep 2024 09:07:30 -0400 Subject: [PATCH 23/38] update server list --- test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts b/test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts index b8132c5ec..ac1f69e1f 100644 --- a/test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts +++ b/test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts @@ -155,7 +155,7 @@ describe("Nested Fast API Deployment", () => { '[data-automation="my connect server-list"]', ); await expect(credentialList).toHaveText( - "my connect server" + process.env.CONNECT_SERVER, + `my connect server\n` + process.env.CONNECT_SERVER, ); }); From 32426973828637fb67e2df39aca5f01ea9f0fa0d Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Mon, 23 Sep 2024 09:21:23 -0400 Subject: [PATCH 24/38] no need to upload artifacts during nightly run --- .github/workflows/nightly.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 1b03fed32..acbb7a46b 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -31,16 +31,6 @@ jobs: needs: nightly secrets: inherit uses: ./.github/workflows/cleanup.yaml - archive: - needs: build - uses: ./.github/workflows/archive.yaml - upload: - needs: - - archive - uses: ./.github/workflows/upload.yaml - with: - nightly: true - secrets: inherit # Extensions vscode: From 9a49253ae1b61d835250238361a89f18497e6a43 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 12:13:55 -0400 Subject: [PATCH 25/38] use artifacts from package job --- .github/workflows/package.yaml | 12 +++++++ .github/workflows/pull-request.yaml | 10 ++++-- .github/workflows/vscode-ui.yaml | 51 ++++++++++++++++------------- 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index a156138dc..2f5c7cad8 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -20,3 +20,15 @@ jobs: with: name: dist path: dist/**/* + + - uses: actions/upload-artifact@v4 + id: upload-ext-dist + with: + name: ext-dist + path: extensions/vscode/dist/* + + - uses: actions/upload-artifact@v4 + id: upload-ext-bin + with: + name: ext-bin + path: extensions/vscode/bin/* diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 2328e1cf0..5dddf8d7a 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -20,13 +20,16 @@ jobs: # Build build: uses: ./.github/workflows/build.yaml + package: + needs: build + uses: ./.github/workflows/package.yaml archive: needs: build uses: ./.github/workflows/archive.yaml upload: needs: - archive - - vscode-ui + - package uses: ./.github/workflows/upload.yaml secrets: inherit @@ -36,7 +39,10 @@ jobs: secrets: inherit uses: ./.github/workflows/bats.yaml + # disable the vscode-ui tests for now vscode-ui: - needs: build + needs: + - build + - package secrets: inherit uses: ./.github/workflows/vscode-ui.yaml diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 156731228..99aa1cf35 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -4,13 +4,13 @@ on: env: VSCODE_VERSION: stable jobs: - ui-tests: + native: env: + DOCKER: false DOCKER_CONNECT: true + # deploy only these content + CONTENT: "fastapi-simple quarto-website-py" CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} - CI: true - QUARTO_VERSION: 1.4.549 - PYTHON_VERSION: 3.12.4 strategy: fail-fast: false matrix: @@ -22,34 +22,41 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup - uses: extractions/setup-just@v2 - + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - uses: actions/checkout@v4 + with: + repository: rstudio/connect-content + path: "test/content" + sparse-checkout: bundles + sparse-checkout-cone-mode: false + token: ${{ secrets.CONNECT_PAT }} - uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHON_VERSION }} - # disabling quarto until we need it - # - uses: quarto-dev/quarto-actions/setup@v2 - # with: - # version: ${{ env.QUARTO_VERSION }} + python-version: 3.9 + - uses: quarto-dev/quarto-actions/setup@v2 + with: + version: 1.4.549 - uses: actions/download-artifact@v4 with: name: bin path: bin + - uses: actions/download-artifact@v4 + with: + name: ext-dist + path: extensions/vscode/dist + - uses: actions/download-artifact@v4 + with: + name: ext-bin + path: extensions/vscode/bin + - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin - - run: just package + # - run: just package - run: just vscode configure - run: just vscode-ui install - - run: just vscode-ui build-connect - - run: just vscode-ui test vscode-nested - env: - SPEC_PATH: ./test/specs/nested-fastapi.spec.ts - WORKSPACE_PATH: ../sample-content/ - - - uses: actions/upload-artifact@v4 - id: upload - with: - name: dist - path: dist/**/* + - run: just vscode-ui test - name: Save screenshots uses: actions/upload-artifact@v4 From b17724fa24478e0ec75474e23c57d673bf672c38 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 12:23:11 -0400 Subject: [PATCH 26/38] use artifacts from package job --- .github/workflows/vscode-ui.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 99aa1cf35..83e3587b0 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -56,7 +56,11 @@ jobs: # - run: just package - run: just vscode configure - run: just vscode-ui install - - run: just vscode-ui test + - run: just vscode-ui build-connect + - run: just vscode-ui test vscode-nested + env: + SPEC_PATH: ./test/specs/nested-fastapi.spec.ts + WORKSPACE_PATH: ../sample-content/ - name: Save screenshots uses: actions/upload-artifact@v4 From c3a53d351a3a16e6294217878109a9d73bd47c7a Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 12:45:10 -0400 Subject: [PATCH 27/38] save node_modules and package-lock too --- .github/workflows/package.yaml | 16 ++++++++++++++++ .github/workflows/vscode-ui.yaml | 10 ++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 2f5c7cad8..8d2209fd3 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -26,9 +26,25 @@ jobs: with: name: ext-dist path: extensions/vscode/dist/* + retention-days: 1 - uses: actions/upload-artifact@v4 id: upload-ext-bin with: name: ext-bin path: extensions/vscode/bin/* + retention-days: 1 + + - uses: actions/upload-artifact@v4 + id: upload-node_modules + with: + name: node_modules + path: extensions/vscode/node_modules/* + retention-days: 1 + + - uses: actions/upload-artifact@v4 + id: upload-package-lock + with: + name: package-lock + path: extensions/vscode/package-lock.json + retention-days: 1 diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 83e3587b0..b7aeac07d 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -51,6 +51,16 @@ jobs: name: ext-bin path: extensions/vscode/bin + - uses: actions/download-artifact@v4 + with: + name: node_modules + path: extensions/vscode/node_modules + + - uses: actions/download-artifact@v4 + with: + name: package-json + path: extensions/vscode/ + - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin # - run: just package From 55164e39dba4f0b690315b23180b569869daad70 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 12:54:04 -0400 Subject: [PATCH 28/38] save node_modules and package-lock too --- .github/workflows/vscode-ui.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index b7aeac07d..c69bb6f38 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -58,7 +58,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: package-json + name: package-lock path: extensions/vscode/ - uses: t1m0thyj/unlock-keyring@v1 From 842a2d2a610a5156e3950a0687ce573ff73236c6 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 13:43:00 -0400 Subject: [PATCH 29/38] save node_modules and package-lock too --- .github/workflows/package.yaml | 42 ++++++++++++++++---------------- .github/workflows/vscode-ui.yaml | 28 ++++++++++----------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 8d2209fd3..d05991ab3 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -22,29 +22,29 @@ jobs: path: dist/**/* - uses: actions/upload-artifact@v4 - id: upload-ext-dist + id: upload-extensions with: - name: ext-dist - path: extensions/vscode/dist/* + name: extensions + path: extensions/vscode/**/* retention-days: 1 - - uses: actions/upload-artifact@v4 - id: upload-ext-bin - with: - name: ext-bin - path: extensions/vscode/bin/* - retention-days: 1 + # - uses: actions/upload-artifact@v4 + # id: upload-ext-bin + # with: + # name: ext-bin + # path: extensions/vscode/bin/* + # retention-days: 1 - - uses: actions/upload-artifact@v4 - id: upload-node_modules - with: - name: node_modules - path: extensions/vscode/node_modules/* - retention-days: 1 + # - uses: actions/upload-artifact@v4 + # id: upload-node_modules + # with: + # name: node_modules + # path: extensions/vscode/node_modules/* + # retention-days: 1 - - uses: actions/upload-artifact@v4 - id: upload-package-lock - with: - name: package-lock - path: extensions/vscode/package-lock.json - retention-days: 1 + # - uses: actions/upload-artifact@v4 + # id: upload-package-lock + # with: + # name: package-lock + # path: extensions/vscode/package-lock.json + # retention-days: 1 diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index c69bb6f38..fc19a326a 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -44,22 +44,22 @@ jobs: path: bin - uses: actions/download-artifact@v4 with: - name: ext-dist - path: extensions/vscode/dist - - uses: actions/download-artifact@v4 - with: - name: ext-bin - path: extensions/vscode/bin + name: extensions + path: extensions/vscode/ + # - uses: actions/download-artifact@v4 + # with: + # name: ext-bin + # path: extensions/vscode/bin - - uses: actions/download-artifact@v4 - with: - name: node_modules - path: extensions/vscode/node_modules + # - uses: actions/download-artifact@v4 + # with: + # name: node_modules + # path: extensions/vscode/node_modules - - uses: actions/download-artifact@v4 - with: - name: package-lock - path: extensions/vscode/ + # - uses: actions/download-artifact@v4 + # with: + # name: package-lock + # path: extensions/vscode/ - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin From 198c59fb2ecbbc0354960ce3e71945ccb4ff4fb3 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 14:02:16 -0400 Subject: [PATCH 30/38] save node_modules and package-lock too --- .github/workflows/package.yaml | 2 +- .github/workflows/vscode-ui.yaml | 54 +++++++++----------------------- 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index d05991ab3..3f89eb071 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -24,7 +24,7 @@ jobs: - uses: actions/upload-artifact@v4 id: upload-extensions with: - name: extensions + name: vscode-extension path: extensions/vscode/**/* retention-days: 1 diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index fc19a326a..e24facc61 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -4,13 +4,13 @@ on: env: VSCODE_VERSION: stable jobs: - native: + ui-tests: env: - DOCKER: false DOCKER_CONNECT: true - # deploy only these content - CONTENT: "fastapi-simple quarto-website-py" CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }} + CI: true + QUARTO_VERSION: 1.4.549 + PYTHON_VERSION: 3.12.4 strategy: fail-fast: false matrix: @@ -22,44 +22,14 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup - uses: extractions/setup-just@v2 - - uses: actions/setup-node@v4 - with: - node-version: 20.x - - uses: actions/checkout@v4 - with: - repository: rstudio/connect-content - path: "test/content" - sparse-checkout: bundles - sparse-checkout-cone-mode: false - token: ${{ secrets.CONNECT_PAT }} + - uses: actions/setup-python@v5 with: - python-version: 3.9 - - uses: quarto-dev/quarto-actions/setup@v2 - with: - version: 1.4.549 - - uses: actions/download-artifact@v4 - with: - name: bin - path: bin - - uses: actions/download-artifact@v4 - with: - name: extensions - path: extensions/vscode/ - # - uses: actions/download-artifact@v4 + python-version: ${{ env.PYTHON_VERSION }} + # disabling quarto until we need it + # - uses: quarto-dev/quarto-actions/setup@v2 # with: - # name: ext-bin - # path: extensions/vscode/bin - - # - uses: actions/download-artifact@v4 - # with: - # name: node_modules - # path: extensions/vscode/node_modules - - # - uses: actions/download-artifact@v4 - # with: - # name: package-lock - # path: extensions/vscode/ + # version: ${{ env.QUARTO_VERSION }} - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin @@ -72,6 +42,12 @@ jobs: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts WORKSPACE_PATH: ../sample-content/ + - uses: actions/upload-artifact@v4 + id: download + with: + name: vscode-extension + path: extensions/vscode + - name: Save screenshots uses: actions/upload-artifact@v4 if: failure() From a6b476d209a613f07f92b6311cad867448f65832 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 14:10:46 -0400 Subject: [PATCH 31/38] rm bin --- .github/workflows/vscode-ui.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index e24facc61..bfe190d8e 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -32,8 +32,7 @@ jobs: # version: ${{ env.QUARTO_VERSION }} - uses: t1m0thyj/unlock-keyring@v1 - - run: chmod -R +x ./bin - # - run: just package + - run: just vscode configure - run: just vscode-ui install - run: just vscode-ui build-connect From b4e0fbcd2088c5ca8d35eb5d3d828cfcf8f03b09 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 14:21:16 -0400 Subject: [PATCH 32/38] rm bin --- .github/workflows/vscode-ui.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index bfe190d8e..ba5ff86d6 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -30,9 +30,13 @@ jobs: # - uses: quarto-dev/quarto-actions/setup@v2 # with: # version: ${{ env.QUARTO_VERSION }} - + - uses: actions/download-artifact@v4 + with: + name: bin + path: bin - uses: t1m0thyj/unlock-keyring@v1 - + - run: chmod -R +x ./bin + # - run: just package - run: just vscode configure - run: just vscode-ui install - run: just vscode-ui build-connect From 6b501f69bcb415d9e15fa7f1b3fac03a7499a6cb Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 24 Sep 2024 14:40:10 -0400 Subject: [PATCH 33/38] reintroduce package step --- .github/workflows/package.yaml | 28 ---------------------------- .github/workflows/pull-request.yaml | 1 - .github/workflows/vscode-ui.yaml | 8 +------- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 3f89eb071..a156138dc 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -20,31 +20,3 @@ jobs: with: name: dist path: dist/**/* - - - uses: actions/upload-artifact@v4 - id: upload-extensions - with: - name: vscode-extension - path: extensions/vscode/**/* - retention-days: 1 - - # - uses: actions/upload-artifact@v4 - # id: upload-ext-bin - # with: - # name: ext-bin - # path: extensions/vscode/bin/* - # retention-days: 1 - - # - uses: actions/upload-artifact@v4 - # id: upload-node_modules - # with: - # name: node_modules - # path: extensions/vscode/node_modules/* - # retention-days: 1 - - # - uses: actions/upload-artifact@v4 - # id: upload-package-lock - # with: - # name: package-lock - # path: extensions/vscode/package-lock.json - # retention-days: 1 diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 5dddf8d7a..553e76d8f 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -43,6 +43,5 @@ jobs: vscode-ui: needs: - build - - package secrets: inherit uses: ./.github/workflows/vscode-ui.yaml diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index ba5ff86d6..177cc2f9b 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -36,7 +36,7 @@ jobs: path: bin - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin - # - run: just package + - run: just package - run: just vscode configure - run: just vscode-ui install - run: just vscode-ui build-connect @@ -45,12 +45,6 @@ jobs: SPEC_PATH: ./test/specs/nested-fastapi.spec.ts WORKSPACE_PATH: ../sample-content/ - - uses: actions/upload-artifact@v4 - id: download - with: - name: vscode-extension - path: extensions/vscode - - name: Save screenshots uses: actions/upload-artifact@v4 if: failure() From f4fa6f580962bdb274ad64ec6ec5e4d7433933c0 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 17:53:10 -0400 Subject: [PATCH 34/38] extract dist --- .github/workflows/vscode-ui.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index 177cc2f9b..ccf106221 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -34,9 +34,27 @@ jobs: with: name: bin path: bin + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist + - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin - - run: just package + + - name: Extract dist on ubuntu + run: | + unzip dist/*-linux-amd64.vsix -d dist/ext + if: matrix.runs-on == 'ubuntu-latest' + - name: Extract dist on windows + run: | + 7z x -y dist/*-windows-amd64.vsix -odist/ext + if: matrix.runs-on == 'windows-latest' + - name: Extract dist on macos + run: | + unzip dist/*-darwin-amd64.vsix -d dist/ext + if: matrix.runs-on == 'macos-latest' + - run: just vscode configure - run: just vscode-ui install - run: just vscode-ui build-connect From f7262352f0d4b9db9b6cf3e1d11aa9255db47c7c Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 17:56:12 -0400 Subject: [PATCH 35/38] needs package --- .github/workflows/pull-request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 553e76d8f..5dddf8d7a 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -43,5 +43,6 @@ jobs: vscode-ui: needs: - build + - package secrets: inherit uses: ./.github/workflows/vscode-ui.yaml From 5084d01b76b1a7335a8b707ee4fbc253c8328ee9 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 18:40:40 -0400 Subject: [PATCH 36/38] point to dist --- .github/workflows/vscode-ui.yaml | 14 ++------------ test/vscode-ui/wdio.conf.ts | 5 ++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/vscode-ui.yaml b/.github/workflows/vscode-ui.yaml index ccf106221..e9c441bfb 100644 --- a/.github/workflows/vscode-ui.yaml +++ b/.github/workflows/vscode-ui.yaml @@ -42,18 +42,8 @@ jobs: - uses: t1m0thyj/unlock-keyring@v1 - run: chmod -R +x ./bin - - name: Extract dist on ubuntu - run: | - unzip dist/*-linux-amd64.vsix -d dist/ext - if: matrix.runs-on == 'ubuntu-latest' - - name: Extract dist on windows - run: | - 7z x -y dist/*-windows-amd64.vsix -odist/ext - if: matrix.runs-on == 'windows-latest' - - name: Extract dist on macos - run: | - unzip dist/*-darwin-amd64.vsix -d dist/ext - if: matrix.runs-on == 'macos-latest' + - name: Extract dist + run: unzip dist/*-linux-amd64.vsix -d dist/ext - run: just vscode configure - run: just vscode-ui install diff --git a/test/vscode-ui/wdio.conf.ts b/test/vscode-ui/wdio.conf.ts index 3b24fc764..0f68d21c6 100644 --- a/test/vscode-ui/wdio.conf.ts +++ b/test/vscode-ui/wdio.conf.ts @@ -79,7 +79,10 @@ export const config: Options.Testrunner = { browserVersion: "stable", // also possible: "insiders" or a specific version e.g. "1.80.0" "wdio:vscodeOptions": { // points to directory where extension package.json is located - extensionPath: path.resolve(__dirname, "../../extensions/vscode/"), + extensionPath: + process.env.CI === "true" + ? path.resolve(__dirname, "../../dist/ext/") + : path.resolve(__dirname, "../../extensions/vscode/"), workspacePath: path.resolve( __dirname, process.env.WORKSPACE_PATH || "../sample-content/", From 10faabbc6b276a87e8f6c2f3cf5b57b1086fa058 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 1 Oct 2024 15:35:18 -0400 Subject: [PATCH 37/38] revert main workflow changes --- .github/workflows/main.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 32ac23c79..7b7803077 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,12 +14,16 @@ jobs: # Build build: uses: ./.github/workflows/build.yaml + package: + needs: build + uses: ./.github/workflows/package.yaml archive: needs: build uses: ./.github/workflows/archive.yaml upload: needs: - archive + - package uses: ./.github/workflows/upload.yaml secrets: inherit @@ -28,8 +32,3 @@ jobs: needs: build secrets: inherit uses: ./.github/workflows/bats.yaml - - vscode-ui: - needs: build - secrets: inherit - uses: ./.github/workflows/vscode-ui.yaml From fbe73f30c4b1e9e027317d98f302247774a2c2f5 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Tue, 1 Oct 2024 15:48:32 -0400 Subject: [PATCH 38/38] add vscode-ui tests to main --- .github/workflows/pull-request.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 5dddf8d7a..c482ec37e 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -39,7 +39,6 @@ jobs: secrets: inherit uses: ./.github/workflows/bats.yaml - # disable the vscode-ui tests for now vscode-ui: needs: - build