@@ -20,19 +20,26 @@ permissions:
20
20
21
21
env :
22
22
NFPM_VERSION : ' v2.35.3'
23
- GOPROXY : " https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev "
23
+ GOPROXY : " direct "
24
24
25
25
jobs :
26
- set-vars :
26
+ proxy-sanity-check :
27
+ name : Proxy Sanity Check
27
28
runs-on : ubuntu-22.04
29
+ if : ${{ !github.event.pull_request.head.repo.fork }}
30
+ env :
31
+ GOPROXY : " https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev"
28
32
steps :
29
- - name : Set Variables
33
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
34
+ with :
35
+ fetch-tags : ' true'
36
+ - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
37
+ with :
38
+ go-version-file : ' go.mod'
39
+ cache : false
40
+ - name : run goproxy-sanity-check
30
41
run : |
31
- if [[ -z ${{ secrets.ARTIFACTORY_USER }} ]] ||
32
- [[ -z ${{ secrets.ARTIFACTORY_TOKEN }} ]] ||
33
- ${{ github.event.pull_request.head.repo.fork }}; then
34
- echo "GOPROXY=direct" >> $GITHUB_ENV
35
- fi
42
+ make build
36
43
37
44
lint :
38
45
name : Lint
47
54
run : make install-tools
48
55
- name : run lint
49
56
run : make lint
57
+
50
58
unit-test :
51
59
name : Unit Tests
52
60
runs-on : ubuntu-22.04
63
71
with :
64
72
config : ./.testcoverage.yaml
65
73
# # when token is not specified (value '') this feature is turned off
66
- git-token : ${{ github.ref_name == 'v3 ' && secrets.GITHUB_TOKEN || '' }}
74
+ git-token : ${{ github.ref_name == 'main ' && secrets.GITHUB_TOKEN || '' }}
67
75
# # name of orphaned branch where badges are stored
68
76
git-branch : badges
77
+
69
78
race-condition-test :
70
79
name : Unit tests with race condition detection
71
80
runs-on : ubuntu-22.04
@@ -77,11 +86,14 @@ jobs:
77
86
cache : false
78
87
- name : Run unit tests with race condition detection
79
88
run : make race-condition-test
89
+
80
90
build-unsigned-snapshot :
81
91
name : Build Unsigned Snapshot
82
92
runs-on : ubuntu-22.04
83
93
steps :
84
94
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
95
+ with :
96
+ fetch-tags : ' true'
85
97
- uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
86
98
with :
87
99
go-version-file : ' go.mod'
@@ -247,7 +259,7 @@ jobs:
247
259
gh-pages-branch : " benchmark-results"
248
260
fail-on-alert : true
249
261
- name : Push benchmark result
250
- if : ${{ success() && github.ref_name == 'v3 '}}
262
+ if : ${{ success() && github.ref_name == 'main '}}
251
263
run : git push 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/nginx/agent.git' benchmark-results:benchmark-results
252
264
load-tests :
253
265
name : Load Tests
@@ -314,10 +326,10 @@ jobs:
314
326
benchmark-data-dir-path : " "
315
327
# Set auto-push to false since GitHub API token is not given
316
328
auto-push : false
317
- alert-threshold : ' 175 %'
329
+ alert-threshold : ' 125 %'
318
330
gh-pages-branch : " benchmark-results"
319
331
fail-on-alert : true
320
332
321
333
- name : Push load test result
322
- if : ${{ success() && github.ref_name == 'v3' }}
334
+ if : ${{ success() && github.ref_name == 'main' }}
323
335
run : git push 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/nginx/agent.git' benchmark-results:benchmark-results
0 commit comments