@@ -47,13 +47,45 @@ jobs:
47
47
run : |
48
48
go test ./... -short
49
49
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
+ - 2.41.0
50
60
runs-on : ubuntu-latest
51
- name : " Integration Tests"
61
+ name : " Integration Tests - git ${{matrix.git-version}} "
52
62
env :
53
63
GOFLAGS : -mod=vendor
54
64
steps :
55
65
- name : Checkout code
56
66
uses : actions/checkout@v3
67
+ - name : Restore Git cache
68
+ id : cache-git-restore
69
+ uses : actions/cache/restore@v3
70
+ with :
71
+ path : ~/git-${{matrix.git-version}}
72
+ key : ${{runner.os}}-git-${{matrix.git-version}}
73
+ - name : Install Git dependencies
74
+ run : 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
75
+ - name : Build Git ${{matrix.git-version}}
76
+ if : steps.cache-git-restore.outputs.cache-hit != 'true'
77
+ run : >
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
+ run : sudo make -C "$HOME/git-${{matrix.git-version}}" -j install
84
+ - name : Save Git cache
85
+ uses : actions/cache/save@v3
86
+ with :
87
+ path : ~/git-${{matrix.git-version}}
88
+ key : ${{runner.os}}-git-${{matrix.git-version}}
57
89
- name : Setup Go
58
90
uses : actions/setup-go@v1
59
91
with :
70
102
- name : Test code
71
103
# LONG_WAIT_BEFORE_FAIL means that for a given test assertion, we'll wait longer before failing
72
104
run : |
73
- LONG_WAIT_BEFORE_FAIL=true go test pkg/integration/clients/*.go
105
+ LONG_WAIT_BEFORE_FAIL=true ./scripts/run_integration_tests.sh
74
106
build :
75
107
runs-on : ubuntu-latest
76
108
env :
0 commit comments