Skip to content

Run project tests

Run project tests #20

Workflow file for this run

---
name: Tests
run-name: Run project tests
on: ["pull_request", "workflow_dispatch"]
env:
DBT_PROJECT_DIR: ${{ vars.DBT_PROJECT_DIR }}
DBT_PROFILES_DIR: ${{ vars.DBT_PROFILES_DIR }}
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: 📦 Set up Poetry
run: pipx install poetry==1.8.2
- name: Python setup 🐍
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dbt ⬇️
run: poetry install
- name: Create mock database 🤡
run: >
poetry run python -c
"import duckdb; con = duckdb.connect('$GITHUB_WORKSPACE/billiam_database/billiam.duckdb'); con.close()"
- name: Install dbt dependencies ➕
run: |
poetry run dbt clean --no-clean-project-files-only
poetry run dbt deps
poetry run dbt run-operation set_ci_environment
- name: Parse dbt 🗃️
run: poetry run dbt parse
- name: Run dbt unit tests 🧪
run: poetry run dbt test --select tag:unit-test