General clean up #10

Merged
roysc merged 4 commits from roysc/further-cleanup into v5 2024-07-24 07:13:23 +00:00
2 changed files with 24 additions and 16 deletions
Showing only changes of commit 5661187a32 - Show all commits

View File

@ -1,20 +1,22 @@
name: Docker Build
name: Basic test
on: [pull_request]
jobs:
build:
name: Run docker build
basic-test:
name: Build and sanity check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run docker build
- uses: actions/checkout@v4
- name: Build Docker images
run: docker compose build
test:
# Add a dummy job to avoid failing GitHub CI checks.
# Other checks to be added later.
name: Dummy job
runs-on: ubuntu-latest
steps:
- name: Run dummy job
run: echo "Empty dummy job"
- name: Run Docker containers
run: docker compose up -d
- name: Check migration version
timeout-minutes: 1
run: |
while
version=$(docker compose run --rm migrations version 2>&1 | tail -1 | awk '{print $(NF)}')
[[ $version != 21 ]]; do
echo "Incorrect version: $version"
echo "Retrying..."
done

View File

@ -2,13 +2,14 @@ services:
migrations:
restart: on-failure
depends_on:
- ipld-eth-db
ipld-eth-db:
condition: service_healthy
# Use local build
build:
context: .
dockerfile: Dockerfile
# Use an existing image
image: cerc/ipld-eth-db
image: cerc/ipld-eth-db:local
environment:
DATABASE_USER: "vdbm"
DATABASE_NAME: "cerc_testing"
@ -26,3 +27,8 @@ services:
POSTGRES_PASSWORD: "password"
ports:
- "127.0.0.1:8077:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "vdbm"]
interval: 2s
timeout: 1s
retries: 3