From 2df18c4b052cf239c3c59c69fd9bf14ef80431a9 Mon Sep 17 00:00:00 2001 From: Gautam Botrel Date: Wed, 11 May 2022 11:28:46 -0500 Subject: [PATCH] build: update CI --- .github/workflows/pr.yml | 6 ++++-- .github/workflows/push.yml | 6 ++++-- .golangci.yml | 12 ++++++++++++ std/signature/eddsa/eddsa_test.go | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0f283a5e0c..cf43109b60 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -95,7 +95,8 @@ jobs: "actor": "${{ github.actor }}", "repo": "${{ github.repository }}", "status": "FAIL", - "url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + "title": "${{ github.event.pull_request.title }}", + "pr": "${{ github.event.pull_request.head.ref }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -117,7 +118,8 @@ jobs: "actor": "${{ github.actor }}", "repo": "${{ github.repository }}", "status": "SUCCESS", - "url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + "title": "${{ github.event.pull_request.title }}", + "pr": "${{ github.event.pull_request.head.ref }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_SUCCESS }} \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 03cb72489b..d33dc30d24 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -103,7 +103,8 @@ jobs: "actor": "${{ github.actor }}", "repo": "${{ github.repository }}", "status": "FAIL", - "url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + "title": "push to ${{ github.event.push.base_ref }}", + "pr": "" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -125,7 +126,8 @@ jobs: "actor": "${{ github.actor }}", "repo": "${{ github.repository }}", "status": "SUCCESS", - "url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + "title": "push to ${{ github.event.push.base_ref }}", + "pr": "" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_SUCCESS }} \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000000..3a5f6fca1b --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,12 @@ +linters: + disable-all: true + enable: + - gofmt + - staticcheck + - gosec + - gosimple + - govet + - ineffassign + +run: + issues-exit-code: 1 \ No newline at end of file diff --git a/std/signature/eddsa/eddsa_test.go b/std/signature/eddsa/eddsa_test.go index 574b4ba9d2..c85ddee7ed 100644 --- a/std/signature/eddsa/eddsa_test.go +++ b/std/signature/eddsa/eddsa_test.go @@ -81,7 +81,7 @@ func TestEddsa(t *testing.T) { for i := 0; i < bound; i++ { seed := time.Now().Unix() t.Logf("setting seed in rand %d", seed) - randomness := rand.New(rand.NewSource(seed)) + randomness := rand.New(rand.NewSource(seed)) //#nosec G404 -- This is a false positive for _, conf := range confs {