Skip to content

Add Unit Tests for DeleteSubscriber Handler #58

Add Unit Tests for DeleteSubscriber Handler

Add Unit Tests for DeleteSubscriber Handler #58

Workflow file for this run

name: Go Test for API Module
on:
push:
paths:
- 'api/**'
- '.github/workflows/**'
branches:
- main
- develop
pull_request:
paths:
- 'api/**'
- '.github/workflows/**'
branches:
- main
- develop
jobs:
test-api:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.0'
- name: Verify Go installation
run: go version
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('api/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod tidy
working-directory: ./api
- name: Run unit tests
run: go test -v ./...
working-directory: ./api