@@ -47,13 +47,47 @@ jobs:
4747 run : |
4848 go test ./... -short
4949 integration-tests :
50+ strategy :
51+ fail-fast : false
52+ matrix :
53+ git-version :
54+ - 2.20.0 # oldest supported version
55+ - 2.22.5
56+ - 2.23.0
57+ - 2.25.1
58+ - 2.30.8
59+ - latest
5060 runs-on : ubuntu-latest
51- name : " Integration Tests"
61+ name : " Integration Tests - git ${{matrix.git-version}} "
5262 env :
5363 GOFLAGS : -mod=vendor
5464 steps :
5565 - name : Checkout code
5666 uses : actions/checkout@v3
67+ - name : Restore Git cache
68+ if : matrix.git-version != 'latest'
69+ id : cache-git-restore
70+ uses : actions/cache/restore@v3
71+ with :
72+ path : ~/git-${{matrix.git-version}}
73+ key : ${{runner.os}}-git-${{matrix.git-version}}
74+ - name : Build Git ${{matrix.git-version}}
75+ if : steps.cache-git-restore.outputs.cache-hit != 'true' && matrix.git-version != 'latest'
76+ run : >
77+ sudo apt-get update && sudo apt-get install --no-install-recommends -y build-essential ca-certificates curl gettext libexpat1-dev libssl-dev libz-dev openssl
78+ && curl -sL "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${{matrix.git-version}}.tar.xz" -o - | tar xJ -C "$HOME"
79+ && cd "$HOME/git-${{matrix.git-version}}"
80+ && ./configure
81+ && make -j
82+ - name : Install Git ${{matrix.git-version}}
83+ if : matrix.git-version != 'latest'
84+ run : sudo make -C "$HOME/git-${{matrix.git-version}}" -j install
85+ - name : Save Git cache
86+ if : steps.cache-git-restore.outputs.cache-hit != 'true' && matrix.git-version != 'latest'
87+ uses : actions/cache/save@v3
88+ with :
89+ path : ~/git-${{matrix.git-version}}
90+ key : ${{runner.os}}-git-${{matrix.git-version}}
5791 - name : Setup Go
5892 uses : actions/setup-go@v1
5993 with :
@@ -67,10 +101,12 @@ jobs:
67101 key : ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test
68102 restore-keys : |
69103 ${{runner.os}}-go-
104+ - name : Print git version
105+ run : git --version
70106 - name : Test code
71107 # LONG_WAIT_BEFORE_FAIL means that for a given test assertion, we'll wait longer before failing
72108 run : |
73- LONG_WAIT_BEFORE_FAIL=true go test pkg/integration/clients/*.go
109+ LONG_WAIT_BEFORE_FAIL=true ./scripts/run_integration_tests.sh
74110 build :
75111 runs-on : ubuntu-latest
76112 env :
0 commit comments