name: Test run-name: ${{ gitea.actor }} on: push: branches: - '**/*' - '!main' jobs: build: runs-on: ubuntu-latest services: postgres: image: postgres:17-alpine env: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DB: postgres options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432/tcp steps: - name: docker ps run: docker ps - name: some run: echo ${{ job.services.postgres.ports[5432] }} - name: some1 run: echo ${{ job.services.postgres }} - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Use Bun uses: oven-sh/setup-bun@v2 with: bun-version: 1.1.29 - name: Install dependencies run: bun install - name: Push Database - Test run: bun run db:push env: POSTGRES_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres - name: Test API run: bun test:api env: POSTGRES_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres