-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (51 loc) · 1.49 KB
/
unit_test.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
65
66
67
name: Unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unit_test_go:
name: Go unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Setup protoc
run: sudo apt install -y protobuf-compiler
- name: Install protoc-gen-go
run: >
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
&& export PATH="$PATH:$(go env GOPATH)/bin"
- name: Build proto files
run: make grpc_init_go
- name: Build go services
run: make build_go
- name: Test document-service
working-directory: ./document-service
run: go test -v ./...
- name: Test user-service
working-directory: ./user-service
run: go test -v ./...
- name: Test gateway-service
working-directory: ./gateway-service
run: go test -v ./...
unit_test_rust:
name: Rust unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup protoc
run: sudo apt install -y protobuf-compiler
- name: Init proto files
run: make grpc_init_rust
- name: Build calendar-service
working-directory: ./calendar-service
run: cargo build --verbose
- name: Test calendar-service
working-directory: ./calendar-service
run: cargo test --verbose