Skip to content

[WIP] Build overhaul #3336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 52 additions & 49 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ jobs:
- run: echo $PYVERSION > ver.txt
- run: cat requirements/*.txt > requirements-all.txt
- restore_cache:
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requirements-all.txt" }}
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requirements-all.txt" }}-uv-v1
- run:
name: Install uv
command: curl -LsSf https://astral.sh/uv/install.sh | sh
- run:
name: 🏁 Build Component Packages & Update Dependencies/Artifacts
command: |
python -m venv venv && . venv/bin/activate
pip install "pip<25.0"
pip install --upgrade wheel setuptools
set -eo pipefail
pip install -e .[ci,dev,testing,celery,diskcache] --progress-bar off
pip list | grep dash
uv venv .venv --python 3.12
source .venv/bin/activate
uv sync --extra ci --extra dev --extra testing --extra celery --extra diskcache --extra build
npm ci
npm run build.sequential
python setup.py sdist
uv build
mkdir dash-package && cp dist/*.tar.gz dash-package/dash-package.tar.gz
ls -la dash-package
no_output_timeout: 30m
Expand All @@ -68,23 +68,23 @@ jobs:
cat /home/circleci/.npm/_logs/*
fi
- save_cache:
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requirements-all.txt" }}
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requirements-all.txt" }}-uv-v1
paths:
- venv
- .venv
- persist_to_workspace:
root: ~/dash
paths:
- dash-package

install-dependencies-38:
install-dependencies-39:
<<: *install-dependencies
docker:
- image: cimg/python:3.8.18-node
- image: cimg/python:3.9.20-node
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYVERSION: python38
PYVERSION: python39
PERCY_ENABLE: 0

lint-unit-312: &lint-unit
Expand All @@ -108,39 +108,43 @@ jobs:
- run: echo $PYVERSION > ver.txt
- run: cat requirements/*.txt > requirements-all.txt
- restore_cache:
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requirements-all.txt" }}
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requirements-all.txt" }}-uv-v1
- run:
name: Install uv
command: curl -LsSf https://astral.sh/uv/install.sh | sh
- browser-tools/install-browser-tools:
chrome-version: 120.0.6099.71
- run:
name: ️️🏗️ pip dev requirements
name: ️️🏗️ Install dependencies with uv
command: |
python -m venv venv && . venv/bin/activate
pip install --upgrade pip wheel
pip install -e .[ci,dev,testing] --no-cache-dir --progress-bar off
uv venv .venv --python 3.12
source .venv/bin/activate
uv sync --extra ci --extra dev --extra testing
- run:
name: 🌸 Python & JS Lint
command: |
. venv/bin/activate
source .venv/bin/activate
set -eo pipefail
pip install -e . --progress-bar off && pip list | grep dash
npm ci npm run initialize
pip list | grep dash
npm ci
npm run initialize
npm run build.sequential
npm run lint
- run:
name: 🐍 Python Unit Tests & ☕ JS Unit Tests
command: |
. venv/bin/activate
source .venv/bin/activate
npm run citest.unit

lint-unit-38:
lint-unit-39:
<<: *lint-unit
docker:
- image: cimg/python:3.8.18-browsers
- image: cimg/python:3.9.20-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYVERSION: python38
PYVERSION: python39
PERCY_ENABLE: 0

build-windows-312:
Expand Down Expand Up @@ -225,17 +229,17 @@ jobs:
- store_artifacts:
path: /tmp/dash_artifacts

test-38:
test-39:
<<: *test
docker:
- image: cimg/python:3.8.18-browsers
- image: cimg/python:3.9.20-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PERCY_ENABLE: 0
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: True
PYVERSION: python38
PYVERSION: python39

dcc-lint-unit-312: &dcc-lint-unit
working_directory: ~/dash
Expand Down Expand Up @@ -263,15 +267,15 @@ jobs:
npm ci
npm run lint

dcc-lint-unit-38:
dcc-lint-unit-39:
<<: *dcc-lint-unit
docker:
- image: cimg/python:3.8.18-node
- image: cimg/python:3.9.20-node
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYVERSION: python38
PYVERSION: python39
PERCY_ENABLE: 0

dcc-312: &dcc-test
Expand Down Expand Up @@ -324,15 +328,15 @@ jobs:
- store_artifacts:
path: /tmp/dash_artifacts

dcc-38:
dcc-39:
<<: *dcc-test
docker:
- image: cimg/python:3.8.18-browsers
- image: cimg/python:3.9.20-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYVERSION: python38
PYVERSION: python39
PERCY_ENABLE: 0

html-312: &html-test
Expand Down Expand Up @@ -372,7 +376,6 @@ jobs:
command: |
. venv/bin/activate
pip install dash-package/dash-package.tar.gz[ci,dev,testing,celery,diskcache] --progress-bar off
pip list | grep dash
cd components/dash-html-components
npm ci
npm run prebuild
Expand All @@ -393,15 +396,15 @@ jobs:
- store_artifacts:
path: /tmp/dash_artifacts

html-38:
html-39:
<<: *html-test
docker:
- image: cimg/python:3.8.18-browsers
- image: cimg/python:3.9.20-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYVERSION: python38
PYVERSION: python39
PERCY_ENABLE: 0

table-visual-test:
Expand Down Expand Up @@ -445,44 +448,44 @@ workflows:
tests:
jobs:
- install-dependencies-312
- install-dependencies-38
- install-dependencies-39

- build-windows-312

- lint-unit-312:
requires:
- install-dependencies-312
- lint-unit-38:
- lint-unit-39:
requires:
- install-dependencies-38
- install-dependencies-39

- test-312:
requires:
- install-dependencies-312
- test-38:
- test-39:
requires:
- install-dependencies-38
- install-dependencies-39

- dcc-lint-unit-312:
requires:
- install-dependencies-312
- dcc-lint-unit-38:
- dcc-lint-unit-39:
requires:
- install-dependencies-38
- install-dependencies-39

- dcc-312:
requires:
- install-dependencies-312
- dcc-38:
- dcc-39:
requires:
- install-dependencies-38
- install-dependencies-39

- html-312:
requires:
- install-dependencies-312
- html-38:
- html-39:
requires:
- install-dependencies-38
- install-dependencies-39

- table-visual-test

Expand Down
Loading
Loading