chore: release v0.5.10 #127
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: Build and test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build and test | |
| run: | | |
| export $(cat ./dev-config/dev.env | xargs) | |
| docker compose up -d | |
| cargo build & # Build while container gets setup | |
| echo "Waiting for PostgreSQL database to be ready..." | |
| max_attempts=30 | |
| attempt=1 | |
| while [ $attempt -le $max_attempts ]; do | |
| if psql "$DATABASE_URL" -c '\q' >/dev/null 2>&1; then | |
| break | |
| fi | |
| if [ $attempt -eq $max_attempts ]; then | |
| echo "Database failed to become ready after $max_attempts attempts" | |
| echo "============================================================" | |
| docker compose logs | |
| echo "============================================================" | |
| exit 1 | |
| fi | |
| sleep 2 | |
| ((attempt++)) | |
| done | |
| cargo test --verbose |