Skip to content

[WIP] CI, build NEXT #1518

[WIP] CI, build NEXT

[WIP] CI, build NEXT #1518

Workflow file for this run

name: lint
on:
push:
branches:
- main
- 'release/**'
pull_request:
env:
GO_VERSION: 1.24
GOTOOLCHAIN: local
GO_INSTALL_DESTINATION: /opt
jobs:
go_current:
timeout-minutes: 5
name: "go stable"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 100
- name: Environment setup
run: |
echo "GO_VERSION=$(make install-go-resolve-version)" >> "$GITHUB_ENV"
echo "PATH=$GO_INSTALL_DESTINATION/go/bin:$HOME/go/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
id: cache-go
with:
path: /opt/go
key: golang-${{ env.GO_VERSION }}
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
id: cache-go-dev
with:
path: ~/go/bin
key: golang-dev-${{ env.GO_VERSION }}-${{ hashFiles('Makefile') }}
- if: ${{ steps.cache-go.outputs.cache-hit != 'true' }}
name: Install go
continue-on-error: false
run: make install-go
- if: ${{ steps.cache-go-dev.outputs.cache-hit != 'true' }}
name: Install dev tools
continue-on-error: false
run: make install-dev-tools
- name: project checks
uses: containerd/project-checks@d7751f3c375b8fe4a84c02a068184ee4c1f59bc4 # v1.2.2
with:
working-directory: .
repo-access-token: ${{ secrets.GITHUB_TOKEN }}
# go-licenses-ignore is set because go-licenses cannot detect the license of the following package:
# * go-base36: Apache-2.0 OR MIT (https://github.com/multiformats/go-base36/blob/master/LICENSE.md)
#
# The list of the CNCF-approved licenses can be found here:
# https://github.com/cncf/foundation/blob/main/allowed-third-party-license-policy.md
go-licenses-ignore: |
github.com/multiformats/go-base36
- name: imports
run: make lint-imports
- name: mod
run: make lint-mod
- name: go
run: make lint-go-all
go_canary:
timeout-minutes: 5
name: "go canary"
runs-on: ubuntu-24.04
env:
GO_VERSION: canary
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Environment setup
run: |
echo "GO_VERSION=$(make install-go-resolve-version)" >> "$GITHUB_ENV"
echo "PATH=$GO_INSTALL_DESTINATION/go/bin:$HOME/go/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
id: cache-go
with:
path: /opt/go
key: golang-${{ env.GO_VERSION }}
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
id: cache-go-dev
with:
path: ~/go/bin
key: golang-dev-${{ env.GO_VERSION }}-${{ hashFiles('Makefile') }}
- if: ${{ steps.cache-go.outputs.cache-hit != 'true' }}
name: Install go
run: make install-go
- if: ${{ steps.cache-go-dev.outputs.cache-hit != 'true' }}
name: Install dev tools
run: make install-dev-tools
- name: imports
run: make lint-imports
- name: mod
run: make lint-mod
- name: go
run: make lint-go-all
other:
timeout-minutes: 5
name: "yaml | shell"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: make lint-yaml
run: make lint-yaml
- name: make lint-shell
run: make lint-shell