From 974028c8b8531d97fd6cf17971cecd290e6e0e78 Mon Sep 17 00:00:00 2001 From: Rohan Singh Date: Fri, 26 Apr 2024 13:01:17 -0400 Subject: [PATCH] ci: Enable caching of Go modules (#1062) Run the checkout action first so that `go.sum` is available for `checkout-go` to cache things. --- .github/workflows/main.yml | 6 +++--- .github/workflows/pull-request.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c39d32a076..f8026462ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go uses: actions/setup-go@v5 with: @@ -55,9 +58,6 @@ jobs: mingw-w64-x86_64-go mingw-w64-x86_64-toolchain - - name: Checkout code - uses: actions/checkout@v4 - - name: Install Linux dependencies if: matrix.os == 'ubuntu-22.04' run: sudo ./scripts/setup-linux.sh diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0f22cb3939..d5014c8811 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,6 +31,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go uses: actions/setup-go@v5 with: @@ -53,9 +56,6 @@ jobs: mingw-w64-x86_64-go mingw-w64-x86_64-toolchain - - name: Checkout code - uses: actions/checkout@v4 - - name: Install Linux dependencies if: matrix.os == 'ubuntu-22.04' run: sudo apt-get install -y libwebp-dev