Skip to content

Commit

Permalink
build: Ensure checkout is the first operation
Browse files Browse the repository at this point in the history
The setup-go step can be sped up by caching Go dependencies. The
input for that operation is the go.sum file. Previously, the
checkout operation was happening after the setup-go, which meant
that go.sum was never available which effectively meant the cache
was disabled.

Signed-off-by: Paulo Gomes <paulo.gomes@suse.com>
  • Loading branch information
pjbgf committed Dec 8, 2023
1 parent b2c1982 commit 5bd1d8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
GIT_DIST_PATH: .git-dist/${{ matrix.git[0] }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: Checkout code
uses: actions/checkout@v4

- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install gettext libcurl4-openssl-dev

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Configure known hosts
if: matrix.platform != 'ubuntu-latest'
Expand Down

0 comments on commit 5bd1d8f

Please sign in to comment.