From 99ef0ac01f4168729d1ae1fb097994efdfc2ad86 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Fri, 4 Apr 2025 11:21:36 +0200 Subject: [PATCH] Update Go testing * Update CI to test all latest versions. * Bump GitHub actions and pin versions for supply chain security. * Enable dependabot to update GitHub actions. * Only build on push to master. * Improve actions security settings. Signed-off-by: SuperQ --- .github/dependabot.yml | 6 ++++++ .github/workflows/test.yml | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3a626c3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9288fef..bb937a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,24 +1,34 @@ name: Test on: push: + branches: + - master pull_request: +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.18', '1.21' ] + go-version: + - '1.18.x' + - '1.25.x' + - '1.26.x' steps: - name: install memcached run: | sudo apt update sudo apt install memcached - - uses: actions/checkout@v3 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Setup Go ${{ matrix.go-version }} - uses: actions/setup-go@v4 + uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: go-version: ${{ matrix.go-version }} - name: Test