name: Backend API CI

on:
  push:
    paths:
      - "apps/backend-api/**"
      - ".github/workflows/backend-ci.yml"
  pull_request:
    paths:
      - "apps/backend-api/**"
      - ".github/workflows/backend-ci.yml"

jobs:
  test:
    runs-on: ubuntu-latest

    defaults:
      run:
        working-directory: apps/backend-api

    steps:
      - uses: actions/checkout@v4

      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: "1.22"

      - name: Download deps
        run: go mod download

      - name: Run tests
        run: go test ./...

