Skip to content

Go Test

Go Test #18

Workflow file for this run

name: Go Test
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api
services:
mongodb:
image: mongo:latest
ports:
- 27546:27017
redis:
image: redis:latest
ports:
- 6349:6379
timescaledb:
image: timescale/timescaledb-ha:pg16
environment:

Check failure on line 26 in .github/workflows/go-test.yml

View workflow run for this annotation

GitHub Actions / Go Test

Invalid workflow file

The workflow is not valid. .github/workflows/go-test.yml (Line: 26, Col: 9): Unexpected value 'environment'
- POSTGRES_PASSWORD=yourpassword
- POSTGRES_DB=shorte_events
ports:
- "5432:5432"
strategy:
matrix:
go-version: ["1.20"]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Print Current Directory
run: |
echo "Current Directory: $(pwd)"
- 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