-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (40 loc) · 1.24 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
name: 'prechecks'
on:
workflow_dispatch:
pull_request_target:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup golang environment
uses: actions/setup-go@v5
with:
go-version: '1.21'
- 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
- name: Setup golang environment
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Install dependencies
run: go mod tidy
- name: Make sure app can build
run: make build