More embedded Pkg API #6652
Workflow file for this run
This file contains 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: Chrome frontend tests | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the main branch | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
branches: | |
- main | |
- release | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
branches-ignore: | |
- release | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
frontend-test: | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 30 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Makes thes `julia` command available | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: "1.10" # our lowest supported version | |
- name: Install Pluto.jl packages | |
run: | | |
julia --project=$GITHUB_WORKSPACE -e "using Pkg; Pkg.instantiate()" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- name: Install Chrome dependencies | |
run: | | |
sudo apt-get update | |
# See https://crbug.com/795759 | |
sudo apt-get install -yq libgconf-2-4 | |
# Install latest chrome dev package, which installs the necessary libs to | |
# make the bundled version of Chromium that Puppeteer installs work. | |
sudo apt-get install -y wget --no-install-recommends | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo apt-get update | |
sudo apt-get install -y google-chrome-stable --no-install-recommends | |
sudo rm -rf /var/lib/apt/lists/* | |
- name: Install dependencies | |
working-directory: ./test/frontend | |
run: | | |
npm install | |
env: | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true" | |
PUPPETEER_EXECUTABLE_PATH: "/usr/bin/google-chrome-stable" | |
- name: Run tests | |
working-directory: ./test/frontend | |
run: | | |
julia --project=$GITHUB_WORKSPACE -e 'import Pluto | |
# Run Pluto.jl server in the background | |
options = Pluto.Configuration.from_flat_kwargs(; | |
port=parse(Int, ENV["PLUTO_PORT"]), | |
require_secret_for_access=false, | |
workspace_use_distributed_stdlib=false, | |
) | |
π = Pluto.ServerSession(; options) | |
server = Pluto.run!(π) | |
run(`npm run test`) | |
close(server)' | |
env: | |
PLUTO_PORT: 1235 | |
PLUTO_TEST_OFFLINE: ${{ github.ref_name == 'release' }} | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true" | |
PUPPETEER_EXECUTABLE_PATH: "/usr/bin/google-chrome-stable" | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-screenshot-artifacts | |
path: ${{ github.workspace }}/test/frontend/artifacts/*.png |