From 03827bf4c8bcb75f8a57889ede48b1e62959949d Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Tue, 10 Dec 2024 13:18:47 +0000 Subject: [PATCH] [GitHub Workflows] Give names to steps (#412) It's a lot easier to read these steps when they all have names. This should not affect operation. Use hash pinning for actions --- .github/workflows/benchmark-go.yml | 11 ++++++++--- .github/workflows/go_test.yml | 11 ++++++++--- .github/workflows/golangci-lint.yml | 6 ++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/benchmark-go.yml b/.github/workflows/benchmark-go.yml index 2d1d96ad..0f24458d 100644 --- a/.github/workflows/benchmark-go.yml +++ b/.github/workflows/benchmark-go.yml @@ -18,14 +18,19 @@ jobs: name: Performance regression check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - name: Fetch Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Install Go + uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.1.0 with: go-version-file: go.mod + - name: Run benchmark run: set -o pipefail; go test ./... -benchmem -run=^$ -bench . | tee output.txt + - name: Store benchmark result - uses: benchmark-action/github-action-benchmark@v1.20.4 + uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4 with: tool: 'go' output-file-path: output.txt diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml index 7c0fc611..3cd4a6e8 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/go_test.yml @@ -14,11 +14,16 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.1.0 + - name: Fetch repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Install Go + uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.1.0 with: go-version: ${{ matrix.go-version }} - - run: go test -v -race ./... + + - name: Run tests + run: go test -v -race ./... test-mysql: env: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ff588e72..a825e77c 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -12,8 +12,10 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.1.0 + - name: Fetch repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install Go + uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.1.0 with: go-version-file: go.mod - name: golangci-lint