Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect: Enable Quarto and Python by default for local execution #487

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/chart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,22 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
run: ct install --target-branch main --all --chart-dirs charts --chart-dirs other-charts
continue-on-error: true

check-versions-connect:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.6.3

- uses: extractions/setup-just@v2

- name: Run executable verification for default interpreters
run: |
just test-connect-interpreter-versions
31 changes: 31 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,34 @@ snapshot-rsw-diff:
{{ DIFF }} $file $file.lock
fi
done

test-connect-interpreter-versions:
#!/usr/bin/env bash
set -xe
cd ./charts/rstudio-connect && helm dependency build && cd -

# find the default image
image=$(
helm template ./charts/rstudio-connect \
--show-only templates/deployment.yaml | \
grep "image\:.*rstudio-connect.*" | \
awk -F": " '{print $2}' | \
xargs)

for lang in "Python" "Quarto" "R"
do
# print the default connect config file for local execution in ini format
# print the section and grep for the Executables to find each interpreter
executables=$(
helm template ./charts/rstudio-connect \
--set config.Launcher.Enabled=false \
--show-only templates/configmap.yaml | \
sed -n -e "/\[$lang\]/,/\[*\]/ p" | \
grep Executable | awk -F= '{print $2}' | \
xargs)

for ex in $executables
do
docker run --rm $image /bin/bash -c "command -v $ex"
done
done
Loading