summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-07-02 20:17:18 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-07-10 15:09:27 +0200
commitd71f5d951eb7bb69cd894750347002bed8416998 (patch)
tree12fe095660ec6b566a60011c728989ff412b0435
parentadce8ad398892c997b77475ce31d01ab2a4a80b5 (diff)
Run integration tests with various git versions
We pick a few interesting ones in the range of supported versions. Based on work by Ryooooooga <eial5q265e5@gmail.com>.
-rw-r--r--.github/workflows/ci.yml40
1 files changed, 38 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ffa788d99..9326ca103 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,13 +47,47 @@ jobs:
run: |
go test ./... -short
integration-tests:
+ strategy:
+ fail-fast: false
+ matrix:
+ git-version:
+ - 2.20.0 # oldest supported version
+ - 2.22.5
+ - 2.23.0
+ - 2.25.1
+ - 2.30.8
+ - latest # We rely on github to have the latest version installed on their VMs
runs-on: ubuntu-latest
- name: "Integration Tests"
+ name: "Integration Tests - git ${{matrix.git-version}}"
env:
GOFLAGS: -mod=vendor
steps:
- name: Checkout code
uses: actions/checkout@v3
+ - name: Restore Git cache
+ if: matrix.git-version != 'latest'
+ id: cache-git-restore
+ uses: actions/cache/restore@v3
+ with:
+ path: ~/git-${{matrix.git-version}}
+ key: ${{runner.os}}-git-${{matrix.git-version}}
+ - name: Build Git ${{matrix.git-version}}
+ if: steps.cache-git-restore.outputs.cache-hit != 'true' && matrix.git-version != 'latest'
+ 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
+ && curl -sL "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${{matrix.git-version}}.tar.xz" -o - | tar xJ -C "$HOME"
+ && cd "$HOME/git-${{matrix.git-version}}"
+ && ./configure
+ && make -j
+ - name: Install Git ${{matrix.git-version}}
+ if: matrix.git-version != 'latest'
+ run: sudo make -C "$HOME/git-${{matrix.git-version}}" -j install
+ - name: Save Git cache
+ if: steps.cache-git-restore.outputs.cache-hit != 'true' && matrix.git-version != 'latest'
+ uses: actions/cache/save@v3
+ with:
+ path: ~/git-${{matrix.git-version}}
+ key: ${{runner.os}}-git-${{matrix.git-version}}
- name: Setup Go
uses: actions/setup-go@v1
with:
@@ -67,9 +101,11 @@ jobs:
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test
restore-keys: |
${{runner.os}}-go-
+ - name: Print git version
+ run: git --version
- name: Test code
run: |
- go test pkg/integration/clients/*.go
+ ./scripts/run_integration_tests.sh
build:
runs-on: ubuntu-latest
env: