From 523828ab0db93455bb4dc017151b39e167f8fa99 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 16 Jan 2025 01:19:24 +0100 Subject: [PATCH 1/2] gha: set default permission to read Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29c256c..50a9563 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,16 @@ -on: [push, pull_request] name: Test + +# Default to 'contents: read', which grants actions to read commits. +# +# If any permission is set, any permission not included in the list is +# implicitly set to "none". +# +# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions +permissions: + contents: read + +on: [push, pull_request] + jobs: test: strategy: From c7ad45aaf344dc58de4d55a065def8738555175d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 16 Jan 2025 01:21:17 +0100 Subject: [PATCH 2/2] gha: add golangci-lint Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 50a9563..b458d72 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,14 @@ jobs: uses: actions/checkout@v4 - name: Test run: go test -v ./... + - name: Lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.63 - name: Test Blake3 run: go test -v ./... working-directory: blake3 + - name: Lint Blake3 + uses: golangci/golangci-lint-action@v6 + with: + version: v1.63