fix postgres db name and comment out debug job

This commit is contained in:
burnettk 2023-02-24 16:57:53 -05:00
parent ff1df1145b
commit 5eb9da00f1
2 changed files with 14 additions and 14 deletions

View File

@ -19,16 +19,16 @@ permissions:
contents: write contents: write
jobs: jobs:
# print the context for debugging in case a job gets skipped # uncomment this to print the context for debugging in case a job is getting skipped
printJob: # printJob:
name: Print event # name: Print event
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Dump GitHub context # - name: Dump GitHub context
env: # env:
GITHUB_CONTEXT: ${{ toJson(github) }} # GITHUB_CONTEXT: ${{ toJson(github) }}
run: | # run: |
echo "$GITHUB_CONTEXT" # echo "$GITHUB_CONTEXT"
dependabot: dependabot:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -41,13 +41,13 @@ if [[ "${1:-}" == "clean" ]]; then
# TODO: check to see if the db already exists and we can connect to it. also actually clean it up. # TODO: check to see if the db already exists and we can connect to it. also actually clean it up.
# start postgres in background with one db # start postgres in background with one db
if [[ "${SPIFFWORKFLOW_BACKEND_DATABASE_TYPE:-}" == "postgres" ]]; then if [[ "${SPIFFWORKFLOW_BACKEND_DATABASE_TYPE:-}" == "postgres" ]]; then
if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_testing -c "select 1"; then if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_unit_testing -c "select 1"; then
docker run --name postgres-spiff -p 5432:5432 -e POSTGRES_PASSWORD=spiffworkflow_backend -e POSTGRES_USER=spiffworkflow_backend -e POSTGRES_DB=spiffworkflow_backend_testing -d postgres docker run --name postgres-spiff -p 5432:5432 -e POSTGRES_PASSWORD=spiffworkflow_backend -e POSTGRES_USER=spiffworkflow_backend -e POSTGRES_DB=spiffworkflow_backend_unit_testing -d postgres
sleep 4 # classy sleep 4 # classy
fi fi
if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_local_development -c "select 1"; then if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_local_development -c "select 1"; then
# create other db. spiffworkflow_backend_testing came with the docker run. # create other db. spiffworkflow_backend_unit_testing came with the docker run.
docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_testing -c "create database spiffworkflow_backend_local_development;" docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_unit_testing -c "create database spiffworkflow_backend_local_development;"
fi fi
fi fi
elif [[ "${1:-}" == "migrate" ]]; then elif [[ "${1:-}" == "migrate" ]]; then