Fix blocktimestamp index #814
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Tests with Docker Compose | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Compose | |
run: docker compose version | |
- name: Build and run services | |
run: docker compose up -d | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Wait for Postgres to be ready | |
run: | | |
until docker compose exec -T db pg_isready -U testuser; do | |
echo "Waiting for Postgres..." | |
sleep 2 | |
done | |
- name: Run tests | |
run: go test -cover ./... | |
- name: Shutdown | |
if: always() | |
run: docker compose down |