From 82b663aee9da22053a8042b0bda60b05802d8c79 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 14:15:37 -0400 Subject: [PATCH 1/5] extract dist --- .github/workflows/contract.yaml | 12 +++++++++++- .github/workflows/nightly.yaml | 5 ++++- test/vscode-ui/wdio.conf.ts | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 0797896d9..59c948401 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -48,17 +48,22 @@ jobs: sparse-checkout: bundles sparse-checkout-cone-mode: false token: ${{ secrets.CONNECT_PAT }} + - name: Install deps on ubuntu run: | sudo apt-get install libcurl4-openssl-dev libsodium-dev libfontconfig1-dev libfribidi-dev libfontconfig1-dev libpng-dev R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" + unzip dist/*.vsix -d dist/ext if: matrix.runs-on == 'ubuntu-latest' - name: Install deps on windows run: | R.exe -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" + 7z x -y dist/*.vsix -odist/ext if: matrix.runs-on == 'windows-latest' - name: Install deps on macos - run: R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" + run: | + R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" + unzip dist/*.vsix -d dist/ext if: matrix.runs-on == 'macos-latest' - run: chmod -R +x ./bin @@ -105,6 +110,11 @@ jobs: 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 b0a34dc42..66d2719e7 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -22,7 +22,10 @@ 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 with: diff --git a/test/vscode-ui/wdio.conf.ts b/test/vscode-ui/wdio.conf.ts index 3b24fc764..f47be8ac2 100644 --- a/test/vscode-ui/wdio.conf.ts +++ b/test/vscode-ui/wdio.conf.ts @@ -79,7 +79,7 @@ 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: path.resolve(__dirname, "../../dist/ext/"), workspacePath: path.resolve( __dirname, process.env.WORKSPACE_PATH || "../sample-content/", From 1da9a8983394e7278a40fe860063535e2d0922a0 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 14:35:59 -0400 Subject: [PATCH 2/5] unzip --- .github/workflows/contract.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 59c948401..744b28027 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -53,17 +53,14 @@ jobs: run: | sudo apt-get install libcurl4-openssl-dev libsodium-dev libfontconfig1-dev libfribidi-dev libfontconfig1-dev libpng-dev R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" - unzip dist/*.vsix -d dist/ext if: matrix.runs-on == 'ubuntu-latest' - name: Install deps on windows run: | R.exe -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" - 7z x -y dist/*.vsix -odist/ext if: matrix.runs-on == 'windows-latest' - name: Install deps on macos run: | R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')" - unzip dist/*.vsix -d dist/ext if: matrix.runs-on == 'macos-latest' - run: chmod -R +x ./bin @@ -123,6 +120,18 @@ jobs: sparse-checkout-cone-mode: false token: ${{ secrets.CONNECT_PAT }} + - name: Install deps on ubuntu + run: | + unzip dist/*.vsix -d dist/ext + if: matrix.runs-on == 'ubuntu-latest' + - name: Install deps on windows + run: | + 7z x -y dist/*.vsix -odist/ext + if: matrix.runs-on == 'windows-latest' + - name: Install deps on macos + run: | + unzip dist/*.vsix -d dist/ext + if: matrix.runs-on == 'macos-latest' - run: chmod -R +x ./bin - run: echo "${FUZZBUCKET_SSH_KEY}" > test/fuzzbucket-ssh-key && chmod 600 test/fuzzbucket-ssh-key From 9579162d43fed0ba53f8390342a1dc8e4b54e30f Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 14:51:12 -0400 Subject: [PATCH 3/5] add os name --- .github/workflows/contract.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 744b28027..0fcbbc2ad 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -120,17 +120,17 @@ jobs: sparse-checkout-cone-mode: false token: ${{ secrets.CONNECT_PAT }} - - name: Install deps on ubuntu + - name: Extract dist on ubuntu run: | - unzip dist/*.vsix -d dist/ext + unzip dist/*-linux-amd64.vsix -d dist/ext if: matrix.runs-on == 'ubuntu-latest' - - name: Install deps on windows + - name: Extract dist on windows run: | - 7z x -y dist/*.vsix -odist/ext + 7z x -y dist/*-windows-amd64.vsix -odist/ext if: matrix.runs-on == 'windows-latest' - - name: Install deps on macos + - name: Extract dist on macos run: | - unzip dist/*.vsix -d dist/ext + unzip dist/*-darwin-amd64.vsix -d dist/ext if: matrix.runs-on == 'macos-latest' - run: chmod -R +x ./bin - run: echo "${FUZZBUCKET_SSH_KEY}" > test/fuzzbucket-ssh-key && chmod 600 test/fuzzbucket-ssh-key From e9a9a4b81bef2e27384c40f48ef0652015e4d14d Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 15:22:12 -0400 Subject: [PATCH 4/5] rm package --- .github/workflows/contract.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 0fcbbc2ad..c2d890f4b 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -136,7 +136,6 @@ jobs: - run: echo "${FUZZBUCKET_SSH_KEY}" > test/fuzzbucket-ssh-key && chmod 600 test/fuzzbucket-ssh-key # vscode ui tests - - run: just package - run: just vscode configure - run: just vscode-ui install - run: python --version From c4efbd95b27bfb1969c0be6a8309b326b41e6e9b Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 25 Sep 2024 16:00:07 -0400 Subject: [PATCH 5/5] point to dist conditionally --- test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts | 2 +- test/vscode-ui/wdio.conf.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 e5a866da6..c39da2002 100644 --- a/test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts +++ b/test/vscode-ui/test/specs/nested-fastapi-deployment.spec.ts @@ -156,7 +156,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, ); }); diff --git a/test/vscode-ui/wdio.conf.ts b/test/vscode-ui/wdio.conf.ts index f47be8ac2..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, "../../dist/ext/"), + 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/",