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: