Skip to content

Merge pull request #132 from cybozu-go/renovate/all-minor-patch #494

Merge pull request #132 from cybozu-go/renovate/all-minor-patch

Merge pull request #132 from cybozu-go/renovate/all-minor-patch #494

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- 'main'
jobs:
build:
name: Build binaries
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make build
check-goreleaser-config:
name: Check goreleaser.yml
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: check -f .goreleaser.yml
test:
name: Small tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make test
- run: make check-generate
- run: make envtest
e2e:
name: End-to-End Tests
strategy:
matrix:
k8s-version:
- v1.30.13@sha256:397209b3d947d154f6641f2d0ce8d473732bd91c87d9575ade99049aa33cd648 # renovate: kindest/node
- v1.31.9@sha256:b94a3a6c06198d17f59cca8c6f486236fa05e2fb359cbd75dabbfc348a10b211 # renovate: kindest/node
- v1.32.5@sha256:e3b2327e3a5ab8c76f5ece68936e4cafaa82edf58486b769727ab0b3b97a5b0d # renovate: kindest/node
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make start KUBERNETES_VERSION=${{ matrix.k8s-version }}
working-directory: e2e
- run: make test
working-directory: e2e
- run: make logs
working-directory: e2e
if: always()
- name: Sanitize version name
id: sanitize
run: |
# extract only version name because ':' is not allowed for artifact name
SANITIZED_K8S_VERSION="$(echo ${{ matrix.k8s-version}} | awk -F '@' '{print $1}')"
echo "SANITIZED_K8S_VERSION=$SANITIZED_K8S_VERSION" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ steps.sanitize.outputs.SANITIZED_K8S_VERSION }}.tar.gz
path: e2e/logs.tar.gz
tilt:
name: Run tilt ci
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make dev
- run: tilt ci
dry-run:
name: Dry-run release
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup tag for goreleaser
run: |
echo "GORELEASER_CURRENT_TAG=$(git describe --tags --abbrev=0 --match "v*" || echo v0.0.0)" >> $GITHUB_ENV
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: --snapshot --skip=publish --clean
- name: Test built containers
run: make container-structure-test