-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (69 loc) · 1.86 KB
/
test.yml
File metadata and controls
85 lines (69 loc) · 1.86 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Test
on:
push:
branches: [ "main" ]
paths:
- "rpc/**"
pull_request:
branches: [ "main" ]
paths:
- "rpc/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rpc
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Golang
uses: actions/setup-go@v5
- name: Setup Protobuf
uses: ./.github/actions/setup-protobuf
- name: Generate protobuf files
run: go generate ./sinks/pb/
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v8
with:
version: latest
working-directory: rpc
Unit-Test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rpc
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache-dependency-path: 'rpc/go.sum'
- name: Setup Protobuf
uses: ./.github/actions/setup-protobuf
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install pytest
pip install -r cmd/pyiceberg_receiver/requirements.txt
- name: gRPC Golang Tests
run: |
go generate ./sinks/pb
go test -timeout 20m -failfast -v -coverprofile=profile.cov ./...
- name: gRPC Python Tests
run: |
python3 -m grpc_tools.protoc -I sinks/pb --python_out=cmd/pyiceberg_receiver --grpc_python_out=cmd/pyiceberg_receiver sinks/pb/pgwatch.proto
pytest
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: rpc/profile.cov