Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 39 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
name: Release
name: CI

on:
push:
tags:
- 'v*'
pull_request:
branches:
- main

env:
GO_VERSION: 1.22
GORELEASER_VERSION: v1.25.1

jobs:
release:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
fetch-depth: 0
go-version: ${{ env.GO_VERSION }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Login to DockerHub
uses: docker/login-action@v3
go-version: ${{ env.GO_VERSION }}
- name: Cache Go modules
uses: actions/cache@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Run goreleaser
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: v1.25.1
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.GORELEASER_VERSION }}
install-only: true
- name: Build
run: goreleaser build --clean --snapshot
- name: Run tests
run: go test -v ./...
2 changes: 1 addition & 1 deletion server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/c2h5oh/datasize"
"github.com/palantir/go-baseapp/baseapp"
"github.com/palantir/go-baseapp/baseapp/datadog"
"github.com/palantir/go-baseapp/appmetrics/emitter/datadog"
Comment thread
ljubon marked this conversation as resolved.
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/die-net/lrucache"
"github.com/gregjones/httpcache"
"github.com/palantir/go-baseapp/baseapp"
"github.com/palantir/go-baseapp/baseapp/datadog"
"github.com/palantir/go-baseapp/appmetrics/emitter/datadog"
Comment thread
ljubon marked this conversation as resolved.
"github.com/palantir/go-githubapp/githubapp"
"github.com/palantir/policy-bot/pull"
"github.com/pkg/errors"
Expand Down