fix skip #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Table Tests | |
on: | |
push: | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
table-unit: | |
name: Table Node Tests (Python ${{ matrix.python-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9","3.12"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install Python dependencies | |
run: pip install -e .[ci,dev,testing] | |
- name: Build | |
run: | | |
npm run build | |
- name: Lint | |
run: | | |
cd components/dash-table | |
npm ci | |
npm run lint | |
- name: Unit | |
run: | | |
cd components/dash-table | |
npm run test.unit | |
table-server: | |
name: Table Server Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] # Specify Python versions | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Install Google Chrome | |
run: | | |
sudo apt-get update | |
# Attempt to install a specific recent, stable version or just google-chrome-stable | |
# For more deterministic builds, you might consider a specific version if available via apt, | |
# or using a Docker image with Chrome pre-installed if extreme consistency is needed. | |
sudo apt-get install -y google-chrome-stable | |
- name: Install ChromeDriver | |
run: | | |
echo "Determining Chrome version..." | |
CHROME_BROWSER_VERSION=$(google-chrome --version) | |
echo "Installed Chrome Browser version: $CHROME_BROWSER_VERSION" | |
# Extract the major version number (e.g., 124 from "Google Chrome 124.0.6367.207") | |
CHROME_MAJOR_VERSION=$(echo "$CHROME_BROWSER_VERSION" | cut -f 3 -d ' ' | cut -f 1 -d '.') | |
echo "Detected Chrome Major version: $CHROME_MAJOR_VERSION" | |
# For Chrome 115 and later, use the new Chrome for Testing (CfT) JSON endpoints | |
if [ "$CHROME_MAJOR_VERSION" -ge 115 ]; then | |
echo "Fetching ChromeDriver version for Chrome $CHROME_MAJOR_VERSION using CfT endpoint..." | |
# Get the latest known good version of chromedriver for this major Chrome version | |
CHROMEDRIVER_VERSION_STRING=$(curl -sS "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MAJOR_VERSION}") | |
if [ -z "$CHROMEDRIVER_VERSION_STRING" ]; then | |
echo "Could not automatically find ChromeDriver version for Chrome $CHROME_MAJOR_VERSION via LATEST_RELEASE. Please check CfT endpoints." | |
# As a fallback, attempt to fetch the known good versions and pick the latest chromedriver. | |
# This is more complex and might require parsing JSON with jq. | |
# For simplicity, we'll rely on LATEST_RELEASE_ for now. | |
# If that fails consistently, you might need a more robust script or a fixed ChromeDriver version. | |
# Alternative: List all known good versions | |
# curl -sS "https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json" | |
exit 1 | |
fi | |
CHROMEDRIVER_URL="https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROMEDRIVER_VERSION_STRING}/linux64/chromedriver-linux64.zip" | |
else | |
# For older Chrome versions (less common now) | |
echo "Fetching ChromeDriver version for Chrome $CHROME_MAJOR_VERSION using older method..." | |
CHROMEDRIVER_VERSION_STRING=$(curl -sS "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}") | |
CHROMEDRIVER_URL="https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION_STRING}/chromedriver_linux64.zip" | |
fi | |
echo "Using ChromeDriver version string: $CHROMEDRIVER_VERSION_STRING" | |
echo "Downloading ChromeDriver from: $CHROMEDRIVER_URL" | |
wget -q -O chromedriver.zip "$CHROMEDRIVER_URL" | |
unzip -o chromedriver.zip -d /tmp/ # Unzip to /tmp | |
# The zip for CfT often contains a directory like chromedriver-linux64/ | |
sudo mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver || sudo mv /tmp/chromedriver /usr/local/bin/chromedriver | |
sudo chmod +x /usr/local/bin/chromedriver | |
# Add /usr/local/bin to GITHUB_PATH to ensure chromedriver is found | |
echo "/usr/local/bin" >> $GITHUB_PATH | |
shell: bash | |
- name: Verify ChromeDriver Installation | |
run: | | |
chromedriver --version | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install Python dependencies | |
run: pip install -e .[ci,dev,testing] | |
- name: Build | |
run: | | |
npm run build | |
- name: Run Table Server Tests | |
run: | | |
cd components/dash-table | |
pytest --nopercyfinalize --headless |