Skip to content

Test template

Test template #8

Workflow file for this run

name: Test template
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
copier-answers.yml
ci_requirements.txt
test_load_dagbag.py
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ci_requirements.txt
# - name: Mk generated dir and place answers
# run: |
# mkdir -p generated
# cp copier-answers.yml generated/copier-answers.yml
- name: Run Copier
run: |
copier --defaults -d setup_dbt_project=True -d setup_dbt_profile=True -d setup_ci_cd=True -d setup_precommit=True -d setup_airflow_dag=True -d dbt_project_dir="." -d dbt_project_name="balboa" -d is_new_project=True -d airflow_profile_path="automate/dbt" -d yml_dags_path="orchestrate/dag_yml_definitions" -d dags_path="orchestrate/dags" -a copier-answers.yml copy https://github.com/datacoves/setup_template.git ./
# run dbt debug and dbt compile
- name: Run dbt commands
run: |
cd ./generated
dbt debug
dbt compile
# run `dbt-coves generate airflow dags`
- name: Generate dags
run: |
dbt-coves generate airflow-dags --yml-path generated/orchestrate/dag_yml_definitions/sample_dag.yml
--dags-path generated/orchestrate/dags
# fill Airflow DagBag with the result of generated dags
- name: Load dags
run: python test_load_dagbag.py
# run pre-commit
- name: Run pre-commit
run: |
cd ./generated
pre-commit run --all-files