forked from googleapis/enterprise-certificate-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (53 loc) · 1.64 KB
/
test-signer-darwin.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: Build and Test Signer Darwin
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Build
working-directory: ./internal/signer/darwin
run: go build -v ./...
# The binary must be built before creating credentials so it can be added
# as a trusted application to the keychain.
- name: Build Test Binary for Signer
working-directory: ./internal/signer/darwin/keychain
run: go test -c .
- name: Create keychain credentials
run: ./scripts/keychain_cred.sh
- name: Run Test Binary for Signer
working-directory: ./internal/signer/darwin/keychain
run: ./keychain.test
- name: Test Darwin Client
working-directory: ./darwin
run: go test -v .
- name: Lint Signer
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ./internal/signer/darwin
args: -E gofmt --max-same-issues 0
- name: Lint Client
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ./darwin
args: -E gofmt --max-same-issues 0
- name: Create Binaries
run: ./build/scripts/darwin_amd64.sh && ./build/scripts/darwin_arm64.sh
- uses: actions/upload-artifact@v3
with:
name: darwin_amd64
path: ./build/bin/darwin_amd64/*
- uses: actions/upload-artifact@v3
with:
name: darwin_arm64
path: ./build/bin/darwin_arm64/*