Skip to content

feat: delegate manual attachment to external terminals #2822

feat: delegate manual attachment to external terminals

feat: delegate manual attachment to external terminals #2822

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
inputs:
prerelease-date:
description: UTC date for the Marketplace pre-release (YYYY-MM-DD)
type: string
default: ''
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: r-lib/actions/setup-r@f9a764fea8d5c63df6ef9a5c7795bf7deb5d7e05 # v2
with:
use-public-rspm: true
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Verify sess source identity and bootstrap
run: pnpm run test:sess-source
- name: Install R test dependencies
run: install.packages(c("remotes", "pkgbuild", "languageserver", "lintr", "renv"))
shell: Rscript {0}
- run: pnpm run build
- name: Verify installed sess identity
run: |
source("R/sess_source.R")
stopifnot(!sess_install_required("dist/resources/sess"))
shell: Rscript {0}
- name: Run sess tests
run: tinytest::test_package("sess")
shell: Rscript {0}
- name: Compile test files
run: pnpm run clean && pnpm exec tsc
- name: Install arf binary for Interactive tests
if: runner.os != 'Windows'
shell: bash
run: |
ARF_ARCH="$(uname -m)"
if [ "${ARF_ARCH}" = "arm64" ]; then ARF_ARCH="aarch64"; fi
if [ "${{ runner.os }}" = "macOS" ]; then
ARF_TARGET="${ARF_ARCH}-apple-darwin"
else
ARF_TARGET="${ARF_ARCH}-unknown-linux-gnu"
fi
ARF_ARCHIVE="arf-console-${ARF_TARGET}.tar.xz"
ARF_RELEASE="https://github.com/eitsupi/arf/releases/download/v0.5.3"
curl -fsSL "${ARF_RELEASE}/${ARF_ARCHIVE}" -o "${RUNNER_TEMP}/${ARF_ARCHIVE}"
curl -fsSL "${ARF_RELEASE}/sha256.sum" -o "${RUNNER_TEMP}/arf.sha256"
(cd "${RUNNER_TEMP}" && awk -v name="${ARF_ARCHIVE}" '$2 == name || $2 == "*" name' arf.sha256 > arf-selected.sha256 && test -s arf-selected.sha256 && shasum -a 256 -c arf-selected.sha256)
mkdir -p "${RUNNER_TEMP}/arf"
tar -xJf "${RUNNER_TEMP}/${ARF_ARCHIVE}" -C "${RUNNER_TEMP}/arf"
ARF_EXECUTABLE=$(find "${RUNNER_TEMP}/arf" -type f -name arf | head -n 1)
test -n "${ARF_EXECUTABLE}"
echo "$(dirname "${ARF_EXECUTABLE}")" >> "$GITHUB_PATH"
echo "ARF_PATH=${ARF_EXECUTABLE}" >> "$GITHUB_ENV"
- name: Test persistent tmux sessions (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y tmux
VSCR_TEST_TMUX=1 pnpm exec mocha out/test/node/interactiveRuntime.test.js --ui tdd --timeout 60000 --grep "^Interactive real R runtime standalone agent survives its launcher process exiting$"
- name: Run Node tests
run: pnpm run test:node
- name: Run extension tests (Linux)
if: runner.os == 'Linux'
run: xvfb-run -a pnpm run test:extension
- name: Run extension tests
if: runner.os != 'Linux'
run: pnpm run test:extension
- name: Preserve extension test failure logs
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: extension-test-logs-${{ runner.os }}
path: |
.vscode-test/user-data/**/logs/**/exthost/exthost.log
.vscode-test/user-data/**/logs/**/exthost/output_logging_*/*.log
retention-days: 7
build:
runs-on: ubuntu-latest
env:
VSIX_FILE: vscode-R.vsix
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Test extension versioning
run: node --test .github/scripts/extension-version.test.js
- name: Set Marketplace pre-release version
if: inputs.prerelease-date
env:
PRERELEASE_DATE: ${{ inputs.prerelease-date }}
run: node .github/scripts/extension-version.js prerelease "$PRERELEASE_DATE"
- name: Package Marketplace pre-release
if: inputs.prerelease-date
run: pnpm exec vsce package --pre-release --no-dependencies -o $VSIX_FILE
- name: Package extension
if: ${{ !inputs.prerelease-date }}
run: pnpm exec vsce package --no-dependencies -o $VSIX_FILE
- name: Verify packaged sess identity
run: node .github/scripts/verify-sess-vsix.js
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.VSIX_FILE }}
path: ${{ env.VSIX_FILE }}
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: r-lib/actions/setup-r@f9a764fea8d5c63df6ef9a5c7795bf7deb5d7e05 # v2
with:
use-public-rspm: true
- name: Install lintr
run: install.packages("lintr")
shell: Rscript {0}
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Lint TypeScript
run: pnpm run lint
- name: Lint R directory
run: lintr::lint_dir("./R")
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
- name: Lint root directory
run: lintr::lint_package("sess")
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true