diff --git a/.github/workflows/FrontendTest.yml b/.github/workflows/FrontendTest.yml index a9b5d55961..07e6cf55da 100644 --- a/.github/workflows/FrontendTest.yml +++ b/.github/workflows/FrontendTest.yml @@ -63,17 +63,19 @@ jobs: - name: Run tests working-directory: ./test/frontend run: | - julia -e "import Pkg; Pkg.add(path=\"$GITHUB_WORKSPACE\"); Pkg.instantiate(); import Pluto; Pluto.run(port=$PLUTO_PORT, require_secret_for_access=false)" & # Run Pluto.jl server in the background + 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, + ) + 🍭 = Pluto.ServerSession(; options) + server = Pluto.run!(🍭) - # Wait for Pluto to initialize - TIMES_TRIED=0 - until [ $TIMES_TRIED -eq 60 ] || $(curl --output /dev/null --silent --fail "http://localhost:$PLUTO_PORT/"); do - printf '.' - TIMES_TRIED=$((TIMES_TRIED+1)) - sleep 1 - done + run(`npm run test`) + + close(server)' - npm run test env: PLUTO_PORT: 1235 PLUTO_TEST_OFFLINE: ${{ github.ref_name == 'release' }}