diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..01b3c38 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Load data into MotherDuck + +on: + merge: + branches: + - main + +jobs: + build: + name: Load data into MotherDuck + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Setup Python + uses: actions/setup-python@v5.0.0 + with: + python-version: "3.11.x" + - name: Install Python dependencies + run: | + python3 -m pip install uv + uv pip install --system -r requirements.txt + - name: Run Transformations + run: | + dbt deps + dbt build --target prod diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f691422 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: PR CI Checks + +on: + pull_request: + branches: + - main + +jobs: + ci: + name: CI Check + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Setup Python + uses: actions/setup-python@v5.0.0 + with: + python-version: "3.11.x" + - name: Setup Node + uses: actions/setup-node@v4.0.2 + with: + node-version: 20.x + - name: Install Python dependencies + run: | + python3 -m pip install uv + uv pip install --system -r requirements.txt + - name: Run Transformations + Lint SQL + run: | + dbt deps + dbt build + sqlfluff lint models --format github-annotation-native + - name: Build Evidence + run: | + npm install --prefix ./reports + npm run sources --prefix ./reports + npm run build --prefix ./reports diff --git a/profiles.yml b/profiles.yml index e183f42..3353aeb 100644 --- a/profiles.yml +++ b/profiles.yml @@ -1,7 +1,10 @@ dbtree: - target: dev outputs: dev: type: duckdb path: ./dbtree.db threads: 8 + prod: + type: duckdb + path: md:dbtree + targt: dev