From e03043a00aea8fd79fc3dd53dfcc5925486ec09b Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 16 Apr 2026 15:27:05 -0400 Subject: [PATCH 1/8] migrate circleci to github action --- .circleci/config.yml | 117 --------------------------------------- .github/workflows/ci.yml | 95 +++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 117 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 61db76e..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,117 +0,0 @@ -version: 2.1 - -orbs: - browser-tools: circleci/browser-tools@1.4.8 - -jobs: - python-3-8: &test-template - docker: - - image: cimg/python:3.8.20-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - - environment: - PERCY_ENABLE: 0 - - steps: - - checkout - - - browser-tools/install-browser-tools: - install-firefox: false - install-geckodriver: false - - - run: - name: โœ๏ธ Write job name. - command: echo $CIRCLE_JOB > circlejob.txt - - - restore_cache: - key: deps1-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum ".circleci/config.yml" }} - - - run: - name: ๐Ÿ—๏ธ Create venv - command: | - python -m venv venv - - - run: - name: ๐Ÿ—๏ธ Install requirements - command: | - . venv/bin/activate - pip install -r tests/requirements.txt --quiet - - - save_cache: - key: deps1-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum ".circleci/config.yml" }} - paths: - - venv - - - run: - name: ๐Ÿงช Generations tests - command: | - . venv/bin/activate - pytest - when: always - - python-3-12-install-test: - docker: - - image: cimg/python:3.12.7-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - - environment: - PERCY_ENABLE: 0 - - steps: - - checkout - - - browser-tools/install-browser-tools: - install-firefox: false - install-geckodriver: false - - - run: - name: โœ๏ธ Write job name. - command: echo $CIRCLE_JOB > circlejob.txt - - - restore_cache: - key: deps1-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum ".circleci/config.yml" }} - - - run: - name: ๐Ÿ—๏ธ Create venv - command: | - python -m venv venv - - - run: - name: ๐Ÿ—๏ธ Install requirements - command: | - . venv/bin/activate - pip install -r tests/requirements.txt --quiet - - - save_cache: - key: deps1-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum ".circleci/config.yml" }} - paths: - - venv - - - run: - name: ๐Ÿงช Generate Project & test - command: | - . venv/bin/activate - mkdir test_install - cd test_install - cookiecutter .. --config-file ../tests/test_config.yaml --no-input - cd test_component - python -m venv venv - . venv/bin/activate - pip install -r tests/requirements.txt --quiet - npm install --ignore-scripts - npm run build - pytest - - -workflows: - version: 2 - build: - jobs: - - python-3-8: - context: dash-docker-hub - - python-3-12-install-test: - context: dash-docker-hub diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4c89601 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,95 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + python-3-8: + runs-on: ubuntu-latest + + env: + PERCY_ENABLE: 0 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: '3.8' + + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true + + - name: Cache pip dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-3.8-${{ hashFiles('tests/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-3.8- + + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install -r tests/requirements.txt --quiet + + - name: Run tests + run: pytest + + python-3-12-install-test: + runs-on: ubuntu-latest + + env: + PERCY_ENABLE: 0 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true + + - name: Cache pip dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-3.12-${{ hashFiles('tests/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-3.12- + + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install -r tests/requirements.txt --quiet + + - name: Generate project and test + run: | + mkdir test_install + cd test_install + cookiecutter .. --config-file ../tests/test_config.yaml --no-input + cd test_component + python -m venv venv + . venv/bin/activate + pip install -r tests/requirements.txt --quiet + npm install --ignore-scripts + npm run build + pytest From 76d0724254fbdea0f837ee889bffeb930a23da74 Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 16 Apr 2026 16:14:03 -0400 Subject: [PATCH 2/8] separate chromedriver install --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c89601..181ce9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,9 @@ jobs: - name: Set up Chrome uses: browser-actions/setup-chrome@v1 - with: - install-chromedriver: true + + - name: Set up ChromeDriver + uses: browser-actions/setup-chromedriver@v1 - name: Cache pip dependencies uses: actions/cache@v4 @@ -65,8 +66,9 @@ jobs: - name: Set up Chrome uses: browser-actions/setup-chrome@v1 - with: - install-chromedriver: true + + - name: Set up ChromeDriver + uses: browser-actions/setup-chromedriver@v1 - name: Cache pip dependencies uses: actions/cache@v4 From 181b0bb1dc352fd1942b4827713831a2061da080 Mon Sep 17 00:00:00 2001 From: Philippe Duval Date: Tue, 21 Apr 2026 11:55:29 -0400 Subject: [PATCH 3/8] Apply suggestions from code review Co-authored-by: Cameron DeCoster --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 181ce9a..e22a630 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: branches: [master] + workflow_dispatch: jobs: python-3-8: @@ -24,6 +25,8 @@ jobs: - name: Set up Chrome uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true - name: Set up ChromeDriver uses: browser-actions/setup-chromedriver@v1 @@ -66,9 +69,8 @@ jobs: - name: Set up Chrome uses: browser-actions/setup-chrome@v1 - - - name: Set up ChromeDriver - uses: browser-actions/setup-chromedriver@v1 + with: + install-chromedriver: true - name: Cache pip dependencies uses: actions/cache@v4 From 2b472cfb8d99e6c763668e50aa2db8fb0cf65a18 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 14 May 2026 10:34:05 -0600 Subject: [PATCH 4/8] Remove nonexistent action --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e22a630..7b0d86f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,9 +28,6 @@ jobs: with: install-chromedriver: true - - name: Set up ChromeDriver - uses: browser-actions/setup-chromedriver@v1 - - name: Cache pip dependencies uses: actions/cache@v4 with: From 87b7d3fdaf2fcbc09541568e29cdde8c2da931c7 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 14 May 2026 10:52:56 -0600 Subject: [PATCH 5/8] Use headless mode --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b0d86f..2923440 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: pip install -r tests/requirements.txt --quiet - name: Run tests - run: pytest + run: pytest --headless python-3-12-install-test: runs-on: ubuntu-latest @@ -93,4 +93,4 @@ jobs: pip install -r tests/requirements.txt --quiet npm install --ignore-scripts npm run build - pytest + pytest --headless From 38cdcd2df1d90c2b8bf728e53b61caff31f39206 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 14 May 2026 11:09:50 -0600 Subject: [PATCH 6/8] Update action versions and pin them --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2923440..78bc099 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,20 +16,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python 3.8 - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: '3.8' - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 + uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2 with: install-chromedriver: true - name: Cache pip dependencies - uses: actions/cache@v4 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-3.8-${{ hashFiles('tests/requirements.txt') }} @@ -52,25 +52,25 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python 3.12 - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: '3.12' - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: '20' - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 + uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2 with: install-chromedriver: true - name: Cache pip dependencies - uses: actions/cache@v4 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-3.12-${{ hashFiles('tests/requirements.txt') }} From cc067d1ac122d89691b92208165119d2521863e6 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 14 May 2026 11:18:49 -0600 Subject: [PATCH 7/8] Add env var for Chrome location --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78bc099..30d2355 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: python-version: '3.8' - name: Set up Chrome + id: setup-chrome uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2 with: install-chromedriver: true @@ -42,6 +43,8 @@ jobs: pip install -r tests/requirements.txt --quiet - name: Run tests + env: + DASH_TEST_CHROMEPATH: ${{ steps.setup-chrome.outputs.chrome-path }} run: pytest --headless python-3-12-install-test: @@ -65,6 +68,7 @@ jobs: node-version: '20' - name: Set up Chrome + id: setup-chrome uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2 with: install-chromedriver: true @@ -83,6 +87,8 @@ jobs: pip install -r tests/requirements.txt --quiet - name: Generate project and test + env: + DASH_TEST_CHROMEPATH: ${{ steps.setup-chrome.outputs.chrome-path }} run: | mkdir test_install cd test_install From 0ffd59cf37d576b80084b33914c487e22dad67cc Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 14 May 2026 11:41:57 -0600 Subject: [PATCH 8/8] Add node setup step for python 3.8 --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30d2355..49e9a9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,11 @@ jobs: with: python-version: '3.8' + - name: Set up Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: '20' + - name: Set up Chrome id: setup-chrome uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2