-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (57 loc) · 1.89 KB
/
go.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: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Check Licenses
run: make licenses-check
- name: Build
run: go build -v ./...
- name: WhiteSource Unified Agent Scan
env:
WS_APIKEY: ${{secrets.WS_APIKEY}}
WS_USERKEY: ${{secrets.WS_USERKEY}}
WS_WSS_URL: https://ibmets.whitesourcesoftware.com/agent
WS_PRODUCTNAME: PSIRT_PRD0011140
WS_PROJECTNAME: ${{github.event.repository.name}}
run: |
echo Downloading WhiteSource Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting WhiteSource Scan
java -jar wss-unified-agent.jar
fi
- name: Ginkgo
run: |
go install github.com/onsi/ginkgo/v2/ginkgo
go install github.com/onsi/gomega/...
- name: Test
run: ginkgo -r --randomize-suites --randomize-all --fail-on-pending --cover --trace --race --show-node-events
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: github.ref != 'refs/heads/main'
with:
distribution: goreleaser
version: latest
args: release --snapshot --clean
- name: Archive build
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/**/*.tar.gz