Skip to content

Commit bb362b0

Browse files
committed
try tests in CI
1 parent b1ec2de commit bb362b0

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
project:
13+
- name: framework
14+
path: ./framework/
1315
- name: lib
1416
path: ./lib/
1517
- name: gotestloghelper

framework/Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
export GOPATH ?= $(shell go env GOPATH)
2+
export GO111MODULE ?= on
3+
CDK8S_CLI_VERSION=2.1.48
4+
5+
LINUX=LINUX
6+
OSX=OSX
7+
WINDOWS=WIN32
8+
OSFLAG :=
9+
ifeq ($(OS),Windows_NT)
10+
OSFLAG = $(WINDOWS)
11+
else
12+
UNAME_S := $(shell uname -s)
13+
ifeq ($(UNAME_S),Linux)
14+
OSFLAG = $(LINUX)
15+
endif
16+
ifeq ($(UNAME_S),Darwin)
17+
OSFLAG = $(OSX)
18+
endif
19+
endif
20+
21+
lint:
22+
pre-commit run go-lint --all-files --show-diff-on-failure --color=always
23+
24+
.PHONY: tidy
25+
tidy:
26+
pre-commit run go-mod-tidy --hook-stage pre-push --all-files --show-diff-on-failure --color=always
27+
28+
.PHONY: go_mod
29+
go_mod:
30+
go mod download
31+
32+
test_unit: go_mod
33+
go test -timeout 5m -count 1 -run TestDocker

framework/components/clnode/clnode_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func checkBasicOutputs(t *testing.T, output *clnode.Output) {
2626
require.Contains(t, output.PostgreSQL.DockerInternalURL, "postgresql://chainlink:thispasswordislongenough@postgresql-")
2727
}
2828

29-
func TestNodeWithSharedDB(t *testing.T) {
29+
func TestDockerNodeWithSharedDB(t *testing.T) {
3030
testCases := []testCase{
3131
{
3232
name: "basic use case",
@@ -62,7 +62,7 @@ func TestNodeWithSharedDB(t *testing.T) {
6262
}
6363
}
6464

65-
func TestNodeWithDB(t *testing.T) {
65+
func TestDockerNodeWithDB(t *testing.T) {
6666
testCases := []testCase{
6767
{
6868
name: "basic use case",

framework/components/simple_node_set/nodeset_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func checkBasicOutputs(t *testing.T, output *ns.Output) {
3737
require.Contains(t, output.CLNodes[1].Node.DockerP2PUrl, "node")
3838
}
3939

40-
func TestNodeSetSharedDB(t *testing.T) {
40+
func TestDockerNodeSetSharedDB(t *testing.T) {
4141
testCases := []testCase{
4242
{
4343
name: "2 nodes cluster, override mode 'all'",

0 commit comments

Comments
 (0)