Files
dlt/.github/workflows/test_docs.yml
anuunchin 266052eb76 Docs: Converting Jupyter notebooks in education to marimo notebooks (#3068)
* Initial commit

* lesson_1_quick_start adjusted for marimo

* lesson_2_dlt_sources_and_resources_create_first_dlt_pipeline marimo

* Fundamentals course 3 improved

* Marimo badges added

* Fundamenta: course 8

* Marimo badge link fix

* Fundamentals: course 7

* Fundamentals: course 6

* Fundamentals: course 5

* Fundamentals: cousre 4

* Fundamentals: course 3

* Fundamentals: course 2

* Fundmantals: course 1

* marimo links corrected

* Inline deps

* Fundamentals: fix lesson 2

* Fundamentals: fix lesson 3

* Fundamentals: fix lesson 4

* Formatting moved to build-molabs

* Fundamentals: fix lesson 5

* Removal of scrolls

* Fundamentals: fix lesson 6

* Fundamentals: fix lesson 7

* Fundamentals: fix lesson 8

* os.environ replaced with dlt.secrets where relevant

* Advanced: fix lesson 5

* Advanced fix lesson 9

* os.environ fixes

* Advanced: fix lesson 1

* Comments cleanup

* Additional comment removal, fix lesson 6 advanced

* Clean main makefile

* Get rid of constants.py

* Nicer json.loads()

* Better functions in preprocess_to_molab

* Tests for doc tooling funcs

* Validate molab command

* Marimo check added

* docs pages adjustment

* limits sqlglot in dev group until fixed

---------

Co-authored-by: Marcin Rudolf <rudolfix@rudolfix.org>
2025-12-16 16:30:32 +01:00

115 lines
3.0 KiB
YAML

name: docs | lint and test tools, snippets and examples
on:
workflow_call:
workflow_dispatch:
env:
RUNTIME__LOG_LEVEL: ERROR
# detect if the workflow is executed in a repo fork
IS_FORK: ${{ github.event.pull_request.head.repo.fork }}
DLT_SECRETS_TOML: ${{ secrets.DLT_SECRETS_TOML }}
# RUNTIME__SENTRY_DSN: https://6f6f7b6f8e0f458a89be4187603b55fe@o1061158.ingest.sentry.io/4504819859914752
# Slack hook for chess in production example
RUNTIME__SLACK_INCOMING_HOOK: ${{ secrets.RUNTIME__SLACK_INCOMING_HOOK }}
# Path to local qdrant database
DESTINATION__QDRANT__CREDENTIALS__PATH: zendesk.qdb
jobs:
run_lint:
name: docs | snippets
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_DB: dlt_data
POSTGRES_USER: loader
POSTGRES_PASSWORD: loader
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out
uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
# - name: Start weaviate
# run: docker compose -f "tests/load/weaviate/docker-compose.yml" up -d
- name: Setup node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
activate-environment: true
enable-cache: true
- name: Start weaviate
run: docker compose -f "tests/load/weaviate/docker-compose.yml" up -d
- name: Install dependencies
run: cd docs && make dev
- name: Install dlthub incl alpha releases
run: cd docs
- name: lint docs
run: cd docs && make lint
- name: lint embedded snippets
run: cd docs && make lint-embedded-snippets
- name: Create secrets.toml for snippets
run: |
cp tests/.dlt/dev.secrets.toml docs/website/docs/.dlt/secrets.toml
- name: test snippets
run: cd docs && make test-snippets
- name: create secrets.toml for examples
run: pwd && echo "$DLT_SECRETS_TOML" > docs/examples/.dlt/secrets.toml
- name: test examples
run: cd docs && make test-examples
- name: run docs preprocessor
run: cd docs && make preprocess-docs
- name: test preprocess_to_molab
run: cd docs && make test-preprocess-molabs
- name: Ensure marimo notebooks are up-to-date
run: cd docs && make validate-molabs