Bump golang to v1.22 in CI #2184
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: critest CRI-O | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- master | |
pull_request: | |
jobs: | |
# | |
# Run CRI tests against CRI-O | |
# | |
linux-build-and-critest-cri-o: | |
strategy: | |
matrix: | |
version: [main] | |
name: ${{matrix.version}} / linux amd64 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
cache: false | |
- name: Setup environment | |
shell: bash | |
run: | | |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Cache go modules and build cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
'%LocalAppData%\go-build' # Windows | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go- | |
- name: Setup system | |
run: | | |
# enable necessary kernel modules | |
sudo ip6tables --list >/dev/null | |
# enable necessary sysctls | |
sudo sysctl -w net.ipv4.conf.all.route_localnet=1 | |
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1 | |
sudo sysctl -w net.ipv4.ip_forward=1 | |
sudo iptables -t nat -I POSTROUTING -s 127.0.0.0/8 ! -d 127.0.0.0/8 -j MASQUERADE | |
# enable criu support | |
sudo apt-get update | |
sudo apt-get install -y criu | |
- name: Install ginkgo | |
run: | | |
go install github.com/onsi/ginkgo/v2/ginkgo@latest | |
ginkgo version | |
sudo cp $(command -v ginkgo) /usr/local/bin | |
- name: Setup GCloud | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Install CRI-O latest main | |
if: ${{matrix.version == 'main'}} | |
run: | | |
curl https://raw.githubusercontent.com/cri-o/packaging/main/get | sudo bash | |
- name: Configure and start CRI-O | |
run: | | |
sudo mkdir -p /etc/crio/crio.conf.d | |
printf '[crio.runtime]\nlog_level = "debug"\n' | sudo tee /etc/crio/crio.conf.d/01-log-level.conf | |
printf '[crio.runtime]\nseccomp_use_default_when_empty = false\n' | sudo tee /etc/crio/crio.conf.d/02-seccomp.conf | |
sudo systemctl daemon-reload | |
sudo systemctl start crio | |
- name: Checkout cri-tools for this commit | |
uses: actions/checkout@v4 | |
with: | |
path: ${{github.workspace}}/src/github.com/kubernetes-sigs/cri-tools | |
- name: Build cri-tools | |
run: | | |
make | |
sudo -E PATH=$PATH make install | |
working-directory: ${{ github.workspace }}/src/github.com/kubernetes-sigs/cri-tools | |
- name: Run critest | |
run: | | |
sudo -E PATH=$PATH critest \ | |
--runtime-endpoint=unix:///var/run/crio/crio.sock \ | |
--ginkgo.flakeAttempts=3 \ | |
--parallel=$(nproc) | |
sudo journalctl -u crio > cri-o.log | |
- name: Upload CRI-O logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cri-o-${{matrix.version}}-${{github.sha}}.log | |
path: cri-o.log |