Skip to content

Commit

Permalink
set composer bucket env in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvatt committed Oct 31, 2023
1 parent b1a879b commit 87c07d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
dataverk_airflow_tag=$(gcloud artifacts docker images list "$DATAVERK_AIRFLOW_IMAGE" --include-tags --sort-by=~Update_Time --limit=1 --format=json | jq -rc '.[0].tags')
echo "KNADA_AIRFLOW_OPERATOR_IMAGE=ghcr.io/navikt/knada-images/dataverk-airflow:$dataverk_airflow_tag" >> $GITHUB_ENV
- name: Run tests
- name: Run tests Knada
env:
AIRFLOW_CONN_SQLITE_DEFAULT: sqlite://?mode=ro
KNADA_TEAM_SECRET: secret
Expand All @@ -83,6 +83,16 @@ jobs:
run: |
airflow dags reserialize
airflow dags test DataverkAirflowKnada
- name: Run tests Composer
env:
AIRFLOW_CONN_SQLITE_DEFAULT: sqlite://?mode=ro
KNADA_TEAM_SECRET: secret
NAMESPACE: default
K8S_IMAGE_PULL_SECRETS: ghcr-creds
MARKEDSPLASSEN_HOST: data.ekstern.dev.nav.no
INTEGRATION_TEST: "true"
GCS_BUCKET: "dataverk-airflow-tests"
run: |
airflow dags test DataverkAirflowComposer
- name: Verify successful dag tests
run: |
Expand Down
3 changes: 0 additions & 3 deletions tests-integration/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
from airflow.models import Variable
from dataverk_airflow import python_operator, notebook_operator, quarto_operator

# Env variable for GCP bucket is automatically set for composer instances
# For the test we must set it manually
os.environ["GCS_BUCKET"] = "dataverk-airflow-tests"

with DAG('DataverkAirflowComposer', start_date=datetime(2023, 2, 15), schedule=None) as dag:
py_op = python_operator(
Expand Down

0 comments on commit 87c07d7

Please sign in to comment.