forked from watsonwanda/oracle-suite
-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (104 loc) · 3 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Run Tests
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
test:
name: Code linting & Unit tests
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Linting code
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52
args: --timeout=10m0s
- name: Start Redis instance
run: docker run -d -p 6379:6379 --name redis -e REDIS_PASSWORD=password123 bitnami/redis:6.2
- name: Test
run: make test
env:
TEST_REDIS_ADDR: "127.0.0.1:6379"
TEST_REDIS_PASS: "password123"
TEST_REDIS_DB: 0
test-e2e-gofer:
name: E2E Tests (Gofer)
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Download vendors
run: go mod vendor
- name: Start Smocker instance for testing
run: docker run -d -p 8080:8080 -p 8081:8081 --name smocker thiht/smocker
- name: Run E2E Tests
working-directory: ./e2e
run: go test -v -p 1 -run ^Test_Gofer
test-e2e-ghost:
name: E2E Tests (Ghost)
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Download vendors
run: go mod vendor
- name: Start Smocker instance for testing
run: docker run -d -p 8080:8080 -p 8081:8081 --name smocker thiht/smocker
- name: Run E2E Tests
working-directory: ./e2e
run: go test -v -p 1 -run ^Test_Ghost
test-e2e-teleport:
name: E2E Tests (Teleport)
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Download vendors
run: go mod vendor
- name: Start Smocker instance for testing
run: docker run -d -p 8080:8080 -p 8081:8081 --name smocker thiht/smocker
- name: Run E2E Tests
working-directory: ./e2e
run: go test -v -p 1 -run ^Test_Teleport