From b7505082509afb58b6bbc427f4954980605910f4 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Thu, 21 Nov 2024 22:05:04 +0800 Subject: [PATCH] Update `actions/setup-go` and setup Dependabot Signed-off-by: Eng Zer Jun --- .github/dependabot.yml | 7 +++++++ .github/workflows/benchmark.yml | 10 ++++++---- .github/workflows/build.yml | 13 +++++++------ .github/workflows/go-slog.yml | 5 +++-- 4 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d202a332 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 91d48e01..df635cde 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -11,11 +11,12 @@ jobs: benchmark: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: '1.22' check-latest: true - - uses: actions/checkout@v4 + cache-dependency-path: go.mod - name: go mod tidy run: | mkdir bench @@ -31,11 +32,12 @@ jobs: sloghanders: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: '1.22' check-latest: true - - uses: actions/checkout@v4 + cache-dependency-path: go.mod - name: go mod tidy run: | mkdir bench diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d635192a..2354f0d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ jobs: matrix: go-version: ['tip', '1.22', '1.21', '1.20', '1.19', '1.18'] steps: + - uses: actions/checkout@v4 - name: Setup Go if: matrix.go-version != 'tip' uses: actions/setup-go@master @@ -28,7 +29,6 @@ jobs: sudo tar xJf gotip.linux-amd64.tar.xz -C /usr/local sudo ln -sf /usr/local/go/bin/go /usr/bin/go go version - - uses: actions/checkout@v4 - name: Build run: go build -v -race - name: Test @@ -38,12 +38,13 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: '1.22' check-latest: true - - uses: actions/checkout@v4 + cache-dependency-path: go.mod - name: Lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.2 - ./bin/golangci-lint run + uses: golangci/golangci-lint-action@v6 + with: + version: v1.57.2 diff --git a/.github/workflows/go-slog.yml b/.github/workflows/go-slog.yml index e6632979..955af43b 100644 --- a/.github/workflows/go-slog.yml +++ b/.github/workflows/go-slog.yml @@ -11,11 +11,12 @@ jobs: benchmark: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: '1.22' check-latest: true - - uses: actions/checkout@v4 + cache-dependency-path: go.mod - name: go mod tidy run: | mkdir bench