@@ -383,55 +383,23 @@ jobs:
383383 run : ./hack/bats/lib/bats-core/bin/bats --timing ./hack/bats/extras/k8s.bats
384384 env :
385385 LIMA_BATS_ALL_TESTS_RETRIES : 3
386-
387- colima :
388- name : " Colima tests (QEMU, Linux host)"
389- runs-on : ubuntu-24.04
390- timeout-minutes : 120
391- strategy :
392- matrix :
393- colima-version : ["v0.6.5"]
394- steps :
395- - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
396- with :
397- # fetch-depth is set to 0 to let `limactl --version` print semver-ish version
398- # fetch-depth: 0 is required for Colima integration test because Colima
399- # checks Lima's version and requires proper semantic version format
400- fetch-depth : 0
401- ref : ${{ github.event.pull_request.head.sha }}
402- - uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
403- with :
404- go-version : 1.25.x
405- - uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
406- with :
407- path : ~/.cache/lima/download
408- key : ${{ runner.os }}-colima-${{ matrix.colima-version }}
409- - name : Make
410- run : make
411- - name : Install
412- run : sudo make install
413- - name : Install colima
386+ - name : " Install colima"
387+ id : install-colima
414388 run : |
415389 git clone https://github.com/abiosoft/colima
416390 cd colima
417- git checkout ${{ matrix.colima-version }}
391+ latest="$(git tag --sort=-v:refname | head -n1)"
392+ git checkout "$latest"
418393 make
419394 sudo make install
420- - name : Install test dependencies
421- run : |
422- sudo apt-get update
423- sudo ./hack/install-qemu.sh
424- - name : " Show cache"
425- run : ./hack/debug-cache.sh
426- - name : " Test"
427- uses : nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
428- with :
429- timeout_minutes : 30
430- retry_on : error
431- max_attempts : 3
432- command : ./hack/test-colima.sh
433- - name : " Show cache"
434- run : ./hack/debug-cache.sh
395+ echo "version=$latest" >>$GITHUB_OUTPUT
396+ - name : " Cache colima"
397+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
398+ with :
399+ path : ~/.cache/colima
400+ key : colima-${{ steps.install-colima.outputs.version }}
401+ - name : " Run BATS colima tests"
402+ run : ./hack/bats/lib/bats-core/bin/bats --timing ./hack/bats/extras/colima.bats
435403
436404 vmnet :
437405 name : " VMNet tests (QEMU)"
0 commit comments