1+ ---
12name : Testing
23
34on :
1213 runs-on : ubuntu-latest
1314 steps :
1415 - name : Check out code
15- uses : actions/checkout@v2
16+ uses : actions/checkout@v3
1617 - name : golangci-lint
1718 uses : golangci/golangci-lint-action@v2
19+ with :
20+ only-new-issues : ${{ github.event_name == 'pull_request' }}
1821
1922 go-test :
2023 name : Go ${{ matrix.go }} Test
2326
2427 strategy :
2528 matrix :
26- go : [ '~ 1.17', '~ 1.18' ]
29+ go : [ '1.17', '1.18', '1.19 ' ]
2730
2831 services :
2932 postgres :
@@ -41,12 +44,13 @@ jobs:
4144 --health-retries 5
4245
4346 steps :
47+ - name : Check out code
48+ uses : actions/checkout@v3
4449 - name : Set up Go
45- uses : actions/setup-go@v2
50+ uses : actions/setup-go@v3
4651 with :
4752 go-version : ${{ matrix.go }}
48- - name : Check out code
49- uses : actions/checkout@v2
53+
5054 - name : Run unit tests
5155 run : make test-unit
5256 - name : Run examples tests
6468 steps :
6569 - name : Done
6670 run : echo "All Golang versions tests are Green!"
71+
72+ test-non-public-schema :
73+ name : Test non-public PG schema
74+ runs-on : ubuntu-latest
75+ needs : [ lint ]
76+
77+ services :
78+ postgres :
79+ image : postgres:10
80+ ports :
81+ - " 5432"
82+ env :
83+ POSTGRES_USER : goengine
84+ POSTGRES_PASSWORD : goengine
85+ POSTGRES_DB : goengine
86+ options : >-
87+ --health-cmd pg_isready
88+ --health-interval 10s
89+ --health-timeout 5s
90+ --health-retries 5
91+
92+ steps :
93+ - name : Check out code
94+ uses : actions/checkout@v3
95+ - name : Set up Go
96+ uses : actions/setup-go@v3
97+ with :
98+ go-version-file : ./go.mod
99+
100+ - name : Run unit tests
101+ run : make test-unit
102+ - name : Run examples tests
103+ run : make test-examples
104+ - name : Run integration tests
105+ run : make test-integration
106+ env :
107+ # integration tests suite creates new DB per test run and initialises schema as well
108+ POSTGRES_DSN : ' postgres://goengine:goengine@localhost:${{ job.services.postgres.ports[5432] }}/goengine?sslmode=disable&search_path=custom'
0 commit comments