name: pull-request on: pull_request: branches: [main] jobs: validate: runs-on: ubuntu-latest services: postgres: image: postgres:17-alpine env: POSTGRES_DB: elprice POSTGRES_USER: elprice POSTGRES_PASSWORD: elprice ports: - 5432:5432 options: >- --health-cmd "pg_isready -U elprice -d elprice" --health-interval 2s --health-timeout 5s --health-retries 30 env: TARGET_HOST: localhost TARGET_PORT: "5432" TARGET_DB: elprice TARGET_USER: elprice TARGET_PASSWORD: elprice steps: - uses: actions/checkout@v4 - name: Test run: | docker run --rm --network host \ -e TARGET_HOST -e TARGET_PORT -e TARGET_DB \ -e TARGET_USER -e TARGET_PASSWORD \ -v "$PWD:/app" -w /app \ clojure:temurin-21-tools-deps-alpine \ clojure -M:test - name: Build production image run: docker build --platform linux/amd64 -t elprice:pr-check .