Some checks failed
CI / build (push) Failing after 32s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
# .gitea/workflows/ci.yml
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_DB: cameleer_saas_test
|
|
POSTGRES_USER: test
|
|
POSTGRES_PASSWORD: test
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
cache: maven
|
|
|
|
- name: Run tests
|
|
run: ./mvnw verify -B
|
|
env:
|
|
SPRING_DATASOURCE_URL: jdbc:postgresql://localhost:5432/cameleer_saas_test
|
|
SPRING_DATASOURCE_USERNAME: test
|
|
SPRING_DATASOURCE_PASSWORD: test
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t cameleer-saas:${{ github.sha }} .
|