-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (44 loc) · 1.39 KB
/
pr-prechecks.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
name: "prechecks"
on:
workflow_dispatch:
pull_request_target:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Setup golang environment
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Install dependencies
run: go mod tidy
- name: Run go test
run: make test
- name: Run Whitesource/Mend scan
run: |
curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
export WS_CHECHKPOLICIES=true
export WS_FORCECHECKALLDEPENDENCIES=true
export WS_FORCEUPDATE=true
export WS_UPDATEINVENTORY=true
java -jar wss-unified-agent.jar -apiKey ${{ secrets.MEND_API_KEY }} -product ${{ secrets.MEND_PRODUCT_NAME }} -project WS-fishymetrics
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Setup golang environment
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Install dependencies
run: go mod tidy
- name: Make sure app can build
run: make build