Skip to content

Merge pull request #16 from Hamzenium/Added-Docker-Setup #18

Merge pull request #16 from Hamzenium/Added-Docker-Setup

Merge pull request #16 from Hamzenium/Added-Docker-Setup #18

Workflow file for this run

name: Go CI/CD
on:
push:
branches:
- Prod # Trigger pipeline only when code is pushed to the Prod branch
pull_request:
branches:
- Prod # Also trigger pipeline for pull requests targeting the Prod branch
jobs:
test:
name: Run Tests in Backend
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23.4 # Use the same Go version as your local setup
- name: Install dependencies
run: |
cd backend
go mod tidy
- name: Run tests in backend directory
run: |
cd backend
go test ./... -v