Skip to content

Commit

Permalink
E2E test: updates for ubuntu 24 test executors
Browse files Browse the repository at this point in the history
  • Loading branch information
testlabauto committed Jan 21, 2025
1 parent b1e37c5 commit 009c4ff
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 36 deletions.
26 changes: 1 addition & 25 deletions .github/actions/install-python/action.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,8 @@
name: "Setup Python"
description: "Install specified Python version."
inputs:
version:
description: "The version of Python to install (e.g., 3.10)"
required: true
default: "3.10"
description: "Install Python dependencies."
runs:
using: "composite"
steps:
- name: Install Specified Python Version
shell: bash
run: |
# Extract Python version from input
PYTHON_VERSION="${{ inputs.version }}"
# Add the deadsnakes PPA repository and update apt
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
# Install the specific Python version and necessary packages
sudo apt-get install -y \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-venv
# Set up update-alternatives for managing multiple Python versions
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1
- name: Install Python dependencies
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/install-r/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ runs:
curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-"$(arch)"-latest.tar.gz | sudo tar xz -C /usr/local
rig add "$R_VERSION"
- name: Configure Posit PPM for Ubuntu 22.04 with Custom HTTP User-Agent
- name: Configure Posit PPM for Ubuntu 24.04 with Custom HTTP User-Agent
shell: bash
run: |
echo "Configuring R to use Posit Package Manager for Jammy..."
echo "Configuring R to use Posit Package Manager for Ubuntu 24.04..."
cat <<EOF > ~/.Rprofile
options(
repos = c(RSPM = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"),
repos = c(RSPM = "https://packagemanager.posit.co/cran/__linux__/noble/latest"),
HTTPUserAgent = sprintf(
"R/%s (%s) R (%s)",
getRversion(), "ubuntu-2404",
Expand Down
2 changes: 0 additions & 2 deletions .github/actions/setup-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ runs:
- name: Setup Python
uses: ./.github/actions/install-python
with:
version: "3.10"

- name: Setup R
uses: ./.github/actions/install-r
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test-e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ jobs:
uses: ./.github/actions/gen-report-dir
if: ${{ !cancelled() }}

- name: Alter AppArmor Restrictions for Playwright (Electron)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: Run Playwright Tests (Electron)
env:
POSITRON_PY_VER_SEL: 3.10.12
POSITRON_PY_VER_SEL: 3.12.3
POSITRON_R_VER_SEL: 4.4.0
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
CURRENTS_CI_BUILD_ID: ${{ github.run_id }}-${{ github.run_attempt }}
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
ROOT=$(dirname $(dirname $(readlink -f $0)))
# --disable-dev-shm-usage: when run on docker containers where size of /dev/shm
# partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory
LINUX_EXTRA_ARGS="--disable-dev-shm-usage"
LINUX_EXTRA_ARGS="--disable-dev-shm-usage --no-sandbox"
fi

VSCODEUSERDATADIR=`mktemp -d 2>/dev/null`
Expand Down Expand Up @@ -71,7 +71,7 @@ npm run test-extension -- -l vscode-colorize-tests
kill_app

echo
echo "### Terminal Suggest tests"
echo "### Terminal Suggest tests"
echo
npm run test-extension -- -l terminal-suggest --enable-proposed-api=vscode.vscode-api-tests
kill_app
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-remote-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
ROOT=$(dirname $(dirname $(readlink -f $0)))
# --disable-dev-shm-usage: when run on docker containers where size of /dev/shm
# partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory
LINUX_EXTRA_ARGS="--disable-dev-shm-usage"
LINUX_EXTRA_ARGS="--disable-dev-shm-usage --no-sandbox"
fi

VSCODEUSERDATADIR=`mktemp -d 2>/dev/null`
Expand Down
15 changes: 13 additions & 2 deletions test/e2e/areas/data-explorer/data-explorer-python-pandas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,19 @@ df2 = pd.DataFrame(data)`;
test('Python - Open Data Explorer for the second time brings focus back [C1078833]', async function ({ app, python }) {

const script = `import pandas as pd
from pydataset import data
Data_Frame = data('mtcars')`;
Data_Frame = pd.DataFrame({
"mpg": [21.0, 21.0, 22.8, 21.4, 18.7],
"cyl": [6, 6, 4, 6, 8],
"disp": [160.0, 160.0, 108.0, 258.0, 360.0],
"hp": [110, 110, 93, 110, 175],
"drat": [3.90, 3.90, 3.85, 3.08, 3.15],
"wt": [2.62, 2.875, 2.32, 3.215, 3.44],
"qsec": [16.46, 17.02, 18.61, 19.44, 17.02],
"vs": [0, 0, 1, 1, 0],
"am": [1, 1, 1, 0, 0],
"gear": [4, 4, 4, 3, 3],
"carb": [4, 4, 1, 1, 2]
})`;
await app.workbench.positronConsole.executeCode('Python', script, '>>>');
await app.workbench.positronQuickaccess.runCommand('workbench.panel.positronVariables.focus');

Expand Down

0 comments on commit 009c4ff

Please sign in to comment.