Skip to content

clean up for tests

clean up for tests #3

Workflow file for this run

name: Go Test
on:
# push:
# branches: [ "v2" ]
pull_request:
branches: ["v2"]
jobs:
test:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
ports:
- 27546:27017
redis:
image: redis:latest
ports:
- 6349:6379
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Change to the API directory
run: cd api
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20 # Specify the Go version you want to use
- name: Install dependencies
run: go mod download
- name: Run tests integration
run: go test -v -tags=postgres,redis ./tests/integration
- name: Run tests unit
run: go test -v ./tests/unit
- name: Clean up PostgreSQL and Redis containers
run: |
docker stop postgres
docker stop redis