From 120a39b0946432608d1c832e191f6cd8d60cba2f Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Mon, 12 May 2025 09:49:26 -0500 Subject: [PATCH 1/4] Add veda SM2A test for VEDA deploy --- .github/actions/terraform-deploy-sm2a/action.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/actions/terraform-deploy-sm2a/action.yml b/.github/actions/terraform-deploy-sm2a/action.yml index 78a545a5..a484d9c5 100644 --- a/.github/actions/terraform-deploy-sm2a/action.yml +++ b/.github/actions/terraform-deploy-sm2a/action.yml @@ -28,16 +28,23 @@ runs: steps: - name: Set up Python - uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + uses: astral-sh/setup-uv@v5 with: python-version: "3.11" - cache: "pip" - + - name: Setup Terraform uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd #v1.4.0 with: terraform_version: 1.3.10 + - name: Test 🧪 + shell: bash + run: | + uv sync --all-groups + export AIRFLOW_HOME=/tmp + uv run airflow db migrate + uv run pytest + - name: Deploy working-directory: ${{ inputs.dir }} shell: bash From 3653c7744f457d0e32edc5fb45afae488d6a44d7 Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Mon, 12 May 2025 09:57:48 -0500 Subject: [PATCH 2/4] Switch working directory for test --- .github/actions/terraform-deploy-sm2a/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/terraform-deploy-sm2a/action.yml b/.github/actions/terraform-deploy-sm2a/action.yml index a484d9c5..40a62c6a 100644 --- a/.github/actions/terraform-deploy-sm2a/action.yml +++ b/.github/actions/terraform-deploy-sm2a/action.yml @@ -38,6 +38,7 @@ runs: terraform_version: 1.3.10 - name: Test 🧪 + working-directory: "veda-data-airflow" shell: bash run: | uv sync --all-groups From 9af938ea2a78af46f20d7743bafdf9a61593a50f Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Mon, 12 May 2025 10:00:29 -0500 Subject: [PATCH 3/4] Add pip cache for uv --- .github/actions/terraform-deploy-sm2a/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/terraform-deploy-sm2a/action.yml b/.github/actions/terraform-deploy-sm2a/action.yml index 40a62c6a..13c72cb9 100644 --- a/.github/actions/terraform-deploy-sm2a/action.yml +++ b/.github/actions/terraform-deploy-sm2a/action.yml @@ -31,6 +31,7 @@ runs: uses: astral-sh/setup-uv@v5 with: python-version: "3.11" + cache: "pip" - name: Setup Terraform uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd #v1.4.0 From 15a353e36b129e8740501173cb4677d40b175585 Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Mon, 12 May 2025 10:12:07 -0500 Subject: [PATCH 4/4] activate uv venv --- .github/actions/terraform-deploy-sm2a/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/terraform-deploy-sm2a/action.yml b/.github/actions/terraform-deploy-sm2a/action.yml index 13c72cb9..f3912e99 100644 --- a/.github/actions/terraform-deploy-sm2a/action.yml +++ b/.github/actions/terraform-deploy-sm2a/action.yml @@ -31,7 +31,6 @@ runs: uses: astral-sh/setup-uv@v5 with: python-version: "3.11" - cache: "pip" - name: Setup Terraform uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd #v1.4.0 @@ -54,6 +53,8 @@ runs: AWS_DEFAULT_REGION: ${{ inputs.aws-region }} AWS_REGION: ${{ inputs.aws-region }} run: | + # Activate uv venv + source ../.venv/bin/activate make sm2a-deploy ENV_FILE=${{ inputs.env-file }} SECRET_NAME=${{ inputs.env_aws_secret_name }} - name: Output workflows API endpoint