diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ccac48..f7da0de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,15 @@ -version: 2 +version: 2.1 + +orbs: + percy: percy/agent@0.1.3 + browser-tools: circleci/browser-tools@1.2.4 jobs: test: working_directory: ~/dashjl docker: - - image: plotly/julia:ci + - image: etpinard/dashjl-tests:0.2.0 auth: username: dashautomation password: $DASH_PAT_DOCKERHUB @@ -15,6 +19,8 @@ jobs: steps: - checkout + - browser-tools/install-browser-tools + - run: name: ℹ️ CI Context command: | @@ -37,8 +43,9 @@ jobs: command: | python -m venv venv . venv/bin/activate + pip install --upgrade pip wheel git clone --depth 1 https://github.com/plotly/dash.git -b dev dash-main - cd dash-main && pip install -e .[dev,testing] --progress-bar off && cd ~/dashjl + cd dash-main && pip install -e .[ci,dev,testing] --progress-bar off && cd .. export PATH=$PATH:/home/circleci/.local/bin/ pytest --headless --nopercyfinalize --junitxml=test-reports/dashjl.xml --percy-assets=test/assets/ test/integration/ - store_artifacts: @@ -48,13 +55,11 @@ jobs: - store_artifacts: path: /tmp/dash_artifacts - - run: - name: 🦔 percy finalize - command: npx percy finalize --all - workflows: version: 2 build: jobs: - - "test" - when: false # disable this workflow until Percy tests are functional again + - test + - percy/finalize_all: + requires: + - test diff --git a/build/Dockerfile b/build/Dockerfile index b616ce0..e0044f1 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,5 @@ -FROM circleci/python:3.7-stretch-node-browsers -MAINTAINER Ryan Patrick Kyle "ryan@plotly.com" +FROM cimg/python:3.7.17-browsers +MAINTAINER Etienne Tétreault-Pinard "code@etpinard.xyz" RUN sudo apt-get update \ && sudo apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false @@ -7,6 +7,6 @@ RUN sudo apt-get update \ RUN cd /usr/local/src \ && sudo mkdir /usr/local/src/julia \ && sudo curl -o julia.tar.gz --location --show-error \ - https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.1-linux-x86_64.tar.gz \ + https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.1-linux-x86_64.tar.gz \ && sudo tar --extract --gzip --strip 1 --directory=/usr/local/src/julia --file=julia.tar.gz \ - && sudo ln -s /usr/local/src/julia/bin/julia /usr/local/bin/julia + && sudo ln -s /usr/local/src/julia/bin/julia /usr/local/bin/julia diff --git a/test/integration/callbacks/jl_callback_context/jlcbcx001_modified_response.jl b/test/integration/callbacks/jl_callback_context/jlcbcx001_modified_response.jl index 9656105..689e5fe 100644 --- a/test/integration/callbacks/jl_callback_context/jlcbcx001_modified_response.jl +++ b/test/integration/callbacks/jl_callback_context/jlcbcx001_modified_response.jl @@ -13,10 +13,11 @@ callback!(app, ) do value cookie = HTTP.Cookie("dash_cookie", value * " - cookie") - println(String(cookie, false)) + cookie_str = HTTP.Cookies.stringify(cookie) + println(cookie_str) http_response = callback_context().response - push!(http_response.headers, "Set-Cookie"=>String(cookie, false)) + push!(http_response.headers, "Set-Cookie"=>cookie_str) return value * " - output" end -run_server(app) \ No newline at end of file +run_server(app) diff --git a/test/integration/callbacks/test_callback_context.py b/test/integration/callbacks/test_callback_context.py index c239bdc..1e0ef73 100644 --- a/test/integration/callbacks/test_callback_context.py +++ b/test/integration/callbacks/test_callback_context.py @@ -20,7 +20,7 @@ def test_jlcbcx001_modified_response(dashjl): dashjl.wait_for_text_to_equal("#output", "abcd - output") cookie = dashjl.driver.get_cookie("dash_cookie") # cookie gets json encoded - assert cookie["value"] == 'abcd - cookie' + assert cookie["value"] == '"abcd - cookie"' assert not dashjl.get_logs() @@ -34,4 +34,4 @@ def test_jlcbcx002_triggered(dashjl): dashjl.find_element("#" + btn).click() dashjl.wait_for_text_to_equal( "#output", "Just clicked {} for the {} time!".format(btn, i) - ) \ No newline at end of file + )