Skip to content

bump

bump #28

Workflow file for this run

name: slim_CI
# for slim CIs all dbt and lightdash runs are built on dev schema; just need to overwrite TARGET_SCHEMA env which lives in the PROD_ENV secret.
on:
push:
branches-ignore: [ "main", "master"]
jobs:
validate_dbt_models:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-env
with:
PROD_ENV: ${{ secrets.PROD_ENV }}
- uses: 8BitJonny/[email protected]
id: PR
- run: echo "PR=${prNumber}" >> $GITHUB_ENV
if: steps.PR.outputs.pr_found == 'true'
env:
prNumber: ${{ steps.PR.outputs.number }}
- name: debug PR
run: ehco "$PR_schema"
env:
PR_schema: '"schema_name": "ci_PR_$PR"'
- name: Cache Python packages
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.local
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/setup-python@v4
with:
python-version: "3.11.x"
- name: Install Python dependencies
run: |
pip install -r requirements.txt
dbt deps
- name: Cache npm packages
uses: actions/cache@v3
with:
path: |
~/.npm
~/.cache/npm
node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Get lightdash version
uses: sergeysova/jq-action@v2
id: version
env:
LIGHTDASH_URL: ${{ secrets.LIGHTDASH_URL }}
with:
cmd: curl -s "${LIGHTDASH_URL}/api/v1/health" | jq -r '.results.version'
- name: Install npm dependencies
run: npm install -g "@lightdash/cli@${{ steps.version.outputs.value }}" || npm install -g @lightdash/cli@latest
- name: validate dbt models
run: dbt build --target ci --vars "$PR_schema"
env:
PR_schema: '"schema_name": "ci_PR_$PR"'
- name: validate LD
id: validate-lightdash
env:
LIGHTDASH_API_KEY: ${{ secrets.LIGHTDASH_API_KEY }}
LIGHTDASH_PROJECT: ${{ secrets.LIGHTDASH_PROJECT }}
LIGHTDASH_URL: ${{ secrets.LIGHTDASH_URL }}
run: lightdash validate