name: CI on: push: branches: [main, develop] pull_request: jobs: server: name: Go (build + vet + test) runs-on: ubuntu-latest services: postgres: image: postgres:17-alpine env: POSTGRES_USER: messenger POSTGRES_PASSWORD: messenger POSTGRES_DB: messenger ports: - 5432:5432 options: >- --health-cmd "pg_isready -U messenger" --health-interval 5s --health-timeout 3s --health-retries 10 env: MESSENGER_TEST_DATABASE_URL: postgres://messenger:messenger@localhost:5432/messenger?sslmode=disable defaults: run: working-directory: server steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: server/go.mod cache-dependency-path: server/go.sum - run: go build ./... - run: go vet ./... - run: go test -race -cover ./... web: name: Web (build + lint) runs-on: ubuntu-latest defaults: run: working-directory: web steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 cache: npm cache-dependency-path: web/package-lock.json - run: npm ci - run: npm run build - run: npm run lint