Skip to content

Merge pull request #444 from bojand/set_metadata_accept_encoding #272

Merge pull request #444 from bojand/set_metadata_accept_encoding

Merge pull request #444 from bojand/set_metadata_accept_encoding #272

Workflow file for this run

name: build
on:
push:
branches:
- master
paths:
- 'go.mod'
- 'go.sum'
- '*.go'
- '*/*.go'
- '*/*/*.go'
- '*/*/*/*.go'
- '*/*/*/*/*.go'
- '*/*/*/*/*/*.go'
- '*/*/*/*/*/*/*.go'
- '*/*/*/*/*/*/*/*.go'
pull_request:
branches:
- master
paths:
- 'go.mod'
- 'go.sum'
- '*.go'
- '*/*.go'
- '*/*/*.go'
- '*/*/*/*.go'
- '*/*/*/*/*.go'
- '*/*/*/*/*/*.go'
- '*/*/*/*/*/*/*.go'
- '*/*/*/*/*/*/*/*.go'
jobs:
build:
runs-on: ubuntu-latest
env:
GO111MODULE: on
GOLANGCI_LINT_VERSION: v1.58.0
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.2
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Cache Go modules
uses: actions/cache@v4
id: cache-go-mod
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache bin directory
id: cache-go-bin
uses: actions/cache@v4
with:
path: ~/go/bin
key: ${{ runner.os }}-go-bin-${{ env.GOLANGCI_LINT_VERSION }}
- name: Install tparse
if: steps.cache-go-bin.outputs.cache-hit != 'true'
run: go install github.com/mfridman/tparse
- name: Install golangci-lint
if: steps.cache-go-bin.outputs.cache-hit != 'true'
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $HOME/go/bin $GOLANGCI_LINT_VERSION
- name: Lint
run: $HOME/go/bin/golangci-lint run --timeout=2m ./...
- name: Test
run: go test -failfast -race -covermode=atomic -coverprofile=coverage.txt -cover -json ./... | $HOME/go/bin/tparse
build_docker_image:
name: Build Docker image from latest tag
runs-on: ubuntu-latest
steps:
- name: Build image
run: docker build https://github.com/bojand/ghz.git
env:
DOCKER_BUILDKIT: '1'