From 84b30bc73e10a0d4a3dac23e38158fe2fd2def55 Mon Sep 17 00:00:00 2001 From: nemishmehta <23.nemishmehta@gmail.com> Date: Mon, 29 Jul 2024 14:32:31 +0200 Subject: [PATCH 1/3] Added GitHub Actions yml. --- .github/workflows/tests.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..37acba5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,29 @@ +name: "tests" +on: + push: + branches: ["main", "dev"] + pull_request: + branches: ["main", "dev"] + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install rye + uses: eifinger/setup-rye@v3 + with: + version: "latest" + - name: Install rye dependencies + run: rye sync + - name: Run pre-commit CI hooks + run: rye run pre-commit run --all-files From 72405d4ca3ea923cac213c6a94806cacaf49feeb Mon Sep 17 00:00:00 2001 From: nemishmehta <23.nemishmehta@gmail.com> Date: Tue, 30 Jul 2024 09:47:12 +0200 Subject: [PATCH 2/3] Updated type of materialization for staging models. --- pyproject.toml | 2 +- src/awesome_inc/warehouse/dbt_project.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index abf2f3e..924bc6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "awesome-inc" -version = "0.4.2" +version = "0.5.0" description = "Add your description here" authors = [ { name = "nemishmehta", email = "23.nemishmehta@gmail.com" } diff --git a/src/awesome_inc/warehouse/dbt_project.yml b/src/awesome_inc/warehouse/dbt_project.yml index 05d014d..3eb77ac 100644 --- a/src/awesome_inc/warehouse/dbt_project.yml +++ b/src/awesome_inc/warehouse/dbt_project.yml @@ -36,6 +36,6 @@ models: awesome_inc: # Config indicated by + and applies to all files under models/example/ staging: - +materialized: table + +materialized: view marts: +materialized: table From a9c1a1e0e574163671af41950ec52ddfb6d0f506 Mon Sep 17 00:00:00 2001 From: nemishmehta <23.nemishmehta@gmail.com> Date: Tue, 30 Jul 2024 10:55:22 +0200 Subject: [PATCH 3/3] Added action to set environment variables. --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37acba5..509314e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,6 +19,10 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Set environment variables + uses: c-py/action-dotenv-to-setenv@v5 + with: + env-file: .env - name: Install rye uses: eifinger/setup-rye@v3 with: