Skip to content

Commit

Permalink
Added e2e tests GH action, with docker compose build - debugging action
Browse files Browse the repository at this point in the history
  • Loading branch information
dividor committed Jun 30, 2024
1 parent db4d940 commit 7384146
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/actions/setvars/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Set environment variables'
description: 'Configures environment variables for a workflow'
inputs:
varFilePath:
description: 'File path to variable file or directory. Defaults to ./.github/variables/* if none specified and runs against each file in that directory.'
required: false
default: ./.github/variables/*
runs:
using: "composite"
steps:
- run: |
Get-Content ${{ inputs.varFilePath }} >> $Env:GITHUB_ENV
shell: pwsh
11 changes: 8 additions & 3 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,21 @@ jobs:

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2


- name: Set Environment Variables
uses: ./.github/actions/setvars
with:
varFilePath: ./.github/variables/variables.env

- name: Build images
run: |
env > .env
export DATA_DB_CONN_STRING="postgresql://${POSTGRES_DATA_USER}:${POSTGRES_DATA_PASSWORD}@${POSTGRES_DATA_HOST}:${POSTGRES_DATA_PORT}/${POSTGRES_DATA_DB}"
export POSTGRES_RECIPE_CONN_STRING="postgresql://${POSTGRES_RECIPE_USER}:${POSTGRES_RECIPE_PASSWORD}@${POSTGRES_RECIPE_HOST}:${POSTGRES_RECIPE_PORT}/${POSTGRES_RECIPE_DB}"
docker buildx create --use --driver=docker-container
docker buildx bake -f ./docker-compose-dev.yml --set *.cache-to="type=gha,mode=max" --set *.cache-from="type=gha" --load --platform linux/amd64
docker buildx bake -f ./docker-compose-dev.yml --set *.cache-to="type=gha,mode=max" --set *.cache-from="type=gha" --load --set *.platform=linux/amd64
- name: Spin up services
run: |
docker-compose -f ./docker-compose-dev.yml up -d datadb
Expand Down

0 comments on commit 7384146

Please sign in to comment.