Skip to content

refactor: separate validation, response and business logic #2

refactor: separate validation, response and business logic

refactor: separate validation, response and business logic #2

name: Backend-API-Unit-Test
on:
push:
paths:
- 'backend/pkg/api/handlers/**'
- 'backend/pkg/api/data_access/**'
branches:
- main
- staging
pull_request:
paths:
- 'backend/pkg/api/handlers/**'
- 'backend/pkg/api/data_access/**'
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
checks: write
jobs:
build:
name: api-unit-test
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'backend/go.mod'
cache-dependency-path: 'backend/go.sum'
- name: Test with the Go CLI
working-directory: backend
run:
go test ./pkg/api/handlers/... ./pkg/api/data_access/...