name: Build and Test API
on:
  push:
    paths:
      - 'finnow-api/**'
      - '.gitea/workflows/api-dev.yaml'
    branches-ignore:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dlang-community/setup-dlang@v2
        with:
          compiler: ldc-latest
      - name: Test
        run: dub test
        working-directory: ./finnow-api
      - name: Build
        run: dub build --build=release
        working-directory: ./finnow-api
