aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorPaulo Gomes <paulo.gomes@suse.com>2023-12-08 09:04:16 +0000
committerPaulo Gomes <paulo.gomes@suse.com>2023-12-08 09:17:50 +0000
commit5bd1d8f4abcfbf1345a1e5a5ec9a96121f3746dc (patch)
tree7c5297fb455711b561f352ba0190ffb1aac3bcbb /.github/workflows
parentb2c19824771bbcbb21abb51abb319c1a610aa6b3 (diff)
downloadgo-git-5bd1d8f4abcfbf1345a1e5a5ec9a96121f3746dc.tar.gz
build: Ensure checkout is the first operation
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>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/git.yml6
-rw-r--r--.github/workflows/test.yml6
2 files changed, 6 insertions, 6 deletions
diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml
index 9539808..d46cd3b 100644
--- a/.github/workflows/git.yml
+++ b/.github/workflows/git.yml
@@ -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
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 875dda7..3780008 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -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'