Skip to content

Commit b3fa31c

Browse files
authored
Merge pull request #74 from keep-network/rfc-18/move-gosec-to-client-yml
Cleanup of Go workflow This PR introduces a couple of cleanup changes in Go workflow, as part of work on RFC-18. Those changes are: * Moving `scan` job from `gosec.yml` to `client.yml` (there is no need to keep them in separate workflows) * Adding `client-` prefix to `scan` and `build-and-test` jobs (to avoid confusion in the future with other similar jobs that we may want to add or remove from required list in branch protection settings) * Removing test result puvblishing step (we've decided to resign from using `EnricoMi/publish-unit-test-result-action` action, as it worked in a confising way sometimes - was assigning the tests results to incorrect workflows) * Removing unnecessary comment
2 parents d3b65bc + 0d760d1 commit b3fa31c

2 files changed

Lines changed: 10 additions & 33 deletions

File tree

.github/workflows/client.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Go
22

3-
#TODO: extend the conditions once workflow gets tested together with other workflows
43
on:
54
push:
65
branches:
@@ -9,7 +8,7 @@ on:
98
workflow_dispatch:
109

1110
jobs:
12-
build-and-test:
11+
client-build-and-test:
1312
runs-on: ubuntu-latest
1413
steps:
1514
- uses: actions/checkout@v2
@@ -25,20 +24,18 @@ jobs:
2524
- name: Build Go
2625
run: go build ./...
2726

28-
- name: Create test results directory
29-
run: mkdir test-results
30-
3127
- name: Install gotestsum
3228
run: go get gotest.tools/gotestsum
3329

3430
- name: Run Go tests
35-
run: gotestsum --junitfile test-results/unit-tests.xml
31+
run: gotestsum
3632

37-
- name: Publish unit test results
38-
uses: EnricoMi/publish-unit-test-result-action@v1
39-
if: always()
33+
client-scan:
34+
runs-on: ubuntu-latest
35+
env:
36+
GO111MODULE: on
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: securego/gosec@master
4040
with:
41-
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
files: ./test-results/unit-tests.xml
43-
check_name: Go Test Results # name under which test results will be presented in GitHub (optional)
44-
comment_on_pr: false # turns off commenting on Pull Requests
41+
args: ./...

.github/workflows/gosec.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)