Skip to content

impl: sort option

impl: sort option #85

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.19
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: use cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Build
run: go build -o ./bin/gocloc cmd/gocloc/main.go
- name: Check imports
shell: bash
run: |
export PATH=$(go env GOPATH)/bin:$PATH
go get golang.org/x/tools/cmd/goimports
diff -u <(echo -n) <(goimports -d .)
- name: Test
run: go test -v