-
Notifications
You must be signed in to change notification settings - Fork 97
64 lines (56 loc) · 1.58 KB
/
flow.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
name: Flow build and test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
flow_test:
runs-on: ubuntu-latest
timeout-minutes: 30
services:
pg_cdc:
image: debezium/postgres:14-alpine
ports:
- 7132:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: checkout sources
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '>=1.19.0'
- name: install gotestsum
run: |
go install gotest.tools/gotestsum@latest
- name: download go modules
run: |
go mod download
working-directory: ./flow
- name: setup gcp service account
id: gcp-service-account
uses: jsdaniell/[email protected]
with:
name: "bq_service_account.json"
json: ${{ secrets.GCP_GH_CI_PKEY }}
- name: setup snowflake credentials
id: sf-credentials
uses: jsdaniell/[email protected]
with:
name: "snowflake_creds.json"
json: ${{ secrets.SNOWFLAKE_GH_CI_PKEY }}
- name: run tests
run: |
gotestsum --format testname -- -p 1 ./...
working-directory: ./flow
env:
TEST_BQ_CREDS: ${{ github.workspace }}/bq_service_account.json
TEST_SF_CREDS: ${{ github.workspace }}/snowflake_creds.json