Repository navigation
69 lines (59 loc) · 1.62 KB
/
Copy pathhistory_test.yml
File metadata and controls
69 lines (59 loc) · 1.62 KB
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
name: test
on:
push:
branches:
- main
pull_request:
branches: [ main ]
jobs:
unitests:
strategy:
matrix:
dbversion: ['timescale/timescaledb:latest-pg13']
go: ['1.17']
platform: [ ubuntu-latest]
runs-on: ${{ matrix.platform }}
services:
postgres:
image: ${{ matrix.dbversion }}
env:
POSTGRES_PASSWORD: pass
POSTGRES_USER: postgres
POSTGRES_DB: postgres
PGSSLMODE: disable
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v .
- name: Sanity Fetch
run: go run ./main.go fetch --config=internal/test/test_history_config.hcl --enable-console-log
env:
CQ_NO_TELEMETRY: 1
- name: Sanity Drop
run: go run ./main.go provider drop test --config=internal/test/test_history_config.hcl
env:
CQ_NO_TELEMETRY: 1
- name: Sanity Init
run: go run ./main.go init test --config=test_init_config.hcl
env:
CQ_NO_TELEMETRY: 1
- name: Test
run: go test -v --tags=history ./...
env:
CQ_NO_TELEMETRY: 1