-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (40 loc) · 976 Bytes
/
go-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Go Test
on:
# push:
# branches: [ "v2" ]
pull_request:
branches: ["v2"]
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
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