Featuuuuure #41
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
# The "display name", shown in the GitHub UI | |
name: Build and test | |
# Trigger, run on push on any branch | |
on: | |
pull_request: | |
jobs: | |
test: # The 'build' job | |
name: "Build application" | |
runs-on: 'ubuntu-latest' | |
steps: | |
# Checkout code | |
- uses: actions/checkout@v4 | |
# Install go 1.21 | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: # Specify input variables to the action | |
go-version: '1.21.x' | |
# Shell script to print the version | |
- run: go version | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test ./... | |
lint: | |
name: "Lint code" | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Verify formatting | |
run: | | |
no_unformatted_files="$(gofmt -l $(git ls-files '*.go') | wc -l)" | |
exit "$no_unformatted_files" |