Skip to content

Commit 1b42288

Browse files
committed
Simplify CI: drop selenium/Firefox/xvfb, use uv sync with caching and RSPM binary R packages
1 parent d1fad97 commit 1b42288

1 file changed

Lines changed: 14 additions & 49 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -17,66 +17,31 @@ jobs:
1717
- name: Setup R
1818
uses: r-lib/actions/setup-r@v2
1919
with:
20-
r-version: '4.3'
20+
r-version: 'release'
21+
use-public-rspm: true
2122

2223
- name: Install R packages
23-
run: |
24-
R -e "install.packages(c('ggplot2', 'mgcv'), repos='https://cran.rstudio.com/')"
25-
26-
- name: Verify R installation
27-
run: |
28-
echo "R_HOME=$R_HOME"
29-
R --version
30-
R -e "library(ggplot2); library(mgcv); cat('R packages loaded successfully\n')"
31-
32-
- name: Setup Python
33-
uses: actions/setup-python@v5
34-
with:
35-
python-version: '3.11'
24+
run: R -e "install.packages(c('ggplot2', 'mgcv'))"
3625

3726
- name: Install uv
38-
run: |
39-
curl -LsSf https://astral.sh/uv/install.sh | sh
40-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
enable-cache: true
4130

4231
- name: Install Python dependencies
43-
run: |
44-
uv pip install -r requirements.txt --system
32+
run: uv sync
4533

4634
- name: Install Chrome for Kaleido
47-
run: |
48-
uv run kaleido_get_chrome
49-
50-
- name: Verify Python packages
51-
run: |
52-
python -c "import pandas, plotly, seaborn, plotnine, altair, rpy2; print('Python packages imported successfully')"
53-
54-
- name: Setup Firefox for Selenium
55-
uses: browser-actions/setup-firefox@v1
56-
57-
- name: Install geckodriver
58-
run: |
59-
wget -q https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz
60-
tar -xzf geckodriver-v0.34.0-linux64.tar.gz
61-
sudo mv geckodriver /usr/local/bin/
62-
geckodriver --version
63-
64-
- name: Setup Xvfb (virtual display)
65-
run: |
66-
sudo apt-get update
67-
sudo apt-get install -y xvfb
35+
run: uv run kaleido_get_chrome
6836

6937
- name: Run tests
70-
run: |
71-
xvfb-run -a python -m pytest tests/ -v
72-
env:
73-
R_HOME: /opt/R/4.3.3/lib/R
38+
run: uv run pytest tests/ -v
7439

75-
- name: Build site
76-
run: |
77-
xvfb-run -a make travis
78-
env:
79-
R_HOME: /opt/R/4.3.3/lib/R
40+
- name: Execute notebook
41+
run: uv run jupyter nbconvert --to notebook --execute Examples.ipynb --output Examples.build.ipynb
42+
43+
- name: Render site
44+
run: uv run python render.py Examples.build.ipynb
8045

8146
- name: Deploy to Netlify (Production)
8247
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

0 commit comments

Comments
 (0)