Skip to content

Use goimports for formatting, fmt-check exit code #86

Use goimports for formatting, fmt-check exit code

Use goimports for formatting, fmt-check exit code #86

Workflow file for this run

name: Check
on:
pull_request: ~
push:
branches:
- main
permissions: read-all
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: Build binary
run: make build
format:
name: Format
runs-on: ubuntu-22.04
needs:
- build
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: Check source code formatting
run: make fmt-check
test-unit:
name: Unit test
runs-on: ubuntu-22.04
needs:
- build
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: Run tests
run: make test
test-dogfeed:
name: Dogfeed
runs-on: ubuntu-22.04
needs:
- test-unit
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: Run on this repository
run: make run
vet:
name: Vet
runs-on: ubuntu-22.04
needs:
- build
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
- name: Vet source code
run: make vet