Skip to content

[EXPERIMENTAL] Reusable workflows for CI simplification #628

[EXPERIMENTAL] Reusable workflows for CI simplification

[EXPERIMENTAL] Reusable workflows for CI simplification #628

Workflow file for this run

# "Hide" the name from the GitHub check status line, as it just clutters the display
name: " "
on:
push:
branches:
- main
- 'release/**'
pull_request:
jobs:
# Source the common environment
environment:
name: " "
uses: ./.github/workflows/reusable_environment.yml
# Linting go
lint-go:
# Define the matrix we want to lint on: every supported OS, with the current go version, and additionally go canary on linux
strategy:
matrix:
# The GOOS-es we run golint for, with no canary (eg: the base supported GO_VERSION)
goos: [linux, freebsd, windows]
# And no canary
canary: [false]
include:
# Only run canary on linux (note: the canary script will select any upcoming golang alpha/beta/RC when the `canary` param is set to a non-empty string)
- goos: linux
canary: true
# If we do not "collapse" the name using a bogux matrix var, it will display all matrix parameters, which we do not want
name: "lint${{ matrix.c }}"
uses: ./.github/workflows/reusable_lint_go.yml
needs: environment
with:
goos: ${{ matrix.goos }}
canary: ${{ matrix.canary }}
os: ${{ needs.environment.outputs.HOST_UBUNTU_LTS }}
goversion: ${{ needs.environment.outputs.GO_VERSION }}
timeout-minutes: ${{ fromJSON(needs.environment.outputs.SHORT_TIMEOUT) }}
# Linting other filetypes
lint-other:
name: "lint"
uses: ./.github/workflows/reusable_lint_other.yml
needs: environment
with:
os: ${{ needs.environment.outputs.HOST_UBUNTU_LTS }}
timeout-minutes: ${{ fromJSON(needs.environment.outputs.SHORT_TIMEOUT) }}