name: Build and Test API
on:
  push:
    paths:
      - 'api/**'
      - '.gitea/workflows/test-api.yaml'
  pull_request:
    types: [opened, reopened, synchronize]
jobs:
  Build-and-test-API:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup DLang
        uses: dlang-community/setup-dlang@v2
        with:
          compiler: ldc-latest
      - name: Build
        working-directory: ./api
        run: dub -q build --build=release
