-
Notifications
You must be signed in to change notification settings - Fork 47
130 lines (111 loc) · 3.57 KB
/
go-pr.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: '[Go] Pull Request'
# This workflow is triggered on pull requests to the main branch and is designed to run in conjunction with the CI workflow(s).
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/go-*.yml'
- 'go/**'
- 'samples/go/**'
- 'server/go/**'
- 'server/protos/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-go-pr-${{ github.ref }}
cancel-in-progress: true
jobs:
securememory-benchmark:
name: 'SecureMemory: Bench'
uses: ./.github/workflows/go-securememory-bench.yml
strategy:
matrix:
go-version: [stable, oldstable]
with:
go-version: ${{ matrix.go-version }}
appencryption-integration:
name: 'AppEncryption: Integration'
uses: ./.github/workflows/go-appencryption-integration.yml
strategy:
matrix:
go-version: [stable, oldstable]
with:
go-version: ${{ matrix.go-version }}
appencryption-benchmark:
name: 'AppEncryption: Bench'
uses: ./.github/workflows/go-appencryption-bench.yml
strategy:
matrix:
go-version: [stable, oldstable]
with:
go-version: ${{ matrix.go-version }}
reference-app:
name: 'Reference App: Build and Lint'
runs-on: ubuntu-latest
container:
image: golang:latest
options: --ulimit core=-1 --ulimit memlock=-1:-1
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Add workspace to safe.directory # needed for VCS stamping
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: stable
cache-dependency-path: |
go/*/go.sum
samples/go/referenceapp/go.sum
- name: Install dependencies
run: |
cd samples/go/referenceapp
go get .
go install gotest.tools/gotestsum@latest
- name: Build
run: |
cd samples/go/referenceapp
./scripts/build.sh
- name: Run linters
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: 'v1.60.1'
skip-cache: true
working-directory: 'samples/go/referenceapp'
server:
name: 'Server: Build and Lint'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Add workspace to safe.directory # needed for VCS stamping
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: stable
cache-dependency-path: |
go/*/go.sum
server/go/go.sum
- name: Install dependencies
run: |
cd server/go
go get .
go install gotest.tools/gotestsum@latest
- name: Build
run: |
cd server/go
./scripts/build.sh
- name: Run unit tests
run: |
cd server/go
sudo prlimit --pid $$ --core=-1
sudo prlimit --pid $$ --memlock=-1:-1
./scripts/test.sh
- name: Run linters
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: 'v1.60.1'
skip-cache: true
working-directory: 'server/go'