-
Notifications
You must be signed in to change notification settings - Fork 27
53 lines (46 loc) · 1.54 KB
/
go.yml
File metadata and controls
53 lines (46 loc) · 1.54 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
name: Go
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
directory:
- '.'
- './entropy'
- './plugin'
- './wrappers/aead'
- './wrappers/alicloudkms'
- './wrappers/awskms'
- './wrappers/azurekeyvault'
- './wrappers/gcpckms'
- './wrappers/huaweicloudkms'
- './wrappers/kmip'
- './wrappers/ocikms'
- './wrappers/pkcs11'
- './wrappers/static'
- './wrappers/tencentcloudkms'
- './wrappers/transit'
- './wrappers/nhncloudskm'
go: ["1.22"]
platform: [ubuntu-latest] # can not run in macOS and Windows
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: go mod package cache
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
- name: Tests
working-directory: ${{ matrix.directory }}
run: go test ./...
- name: Container tests
run: |-
if [ -e "${{ matrix.directory }}/Dockerfile" ]; then
docker build -f "${{ matrix.directory }}/Dockerfile" .
fi