Skip to content

Update thanos objstore library to pull object duration metric fix #390

Update thanos objstore library to pull object duration metric fix

Update thanos objstore library to pull object duration metric fix #390

Workflow file for this run

name: go
on:
push:
branches:
- main
tags:
pull_request:
# TODO(bwplotka): Add tests here.
permissions:
contents: read
jobs:
cross-build-check:
runs-on: ubuntu-latest
name: Go build for different platforms
env:
GOBIN: /tmp/.bin
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.x
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cross build check
run: make crossbuild
build-stringlabels:
runs-on: ubuntu-latest
name: Go build with -tags=stringlabels
env:
GOBIN: /tmp/.bin
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.x
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cross build check
run: go build -tags=stringlabels ./cmd/thanos
lint:
runs-on: ubuntu-latest
name: Linters (Static Analysis) for Go
env:
GOBIN: /tmp/.bin
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.x
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Format.
run: make format
- name: Linting & vetting
run: make go-lint
unit:
strategy:
fail-fast: false
runs-on: ubuntu-latest
name: Thanos unit tests
env:
GOBIN: /home/runner/go/bin
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go.
uses: actions/setup-go@v3
with:
go-version: 1.23.x
- name: Install bingo and configure PATH
run: |
go install github.com/bwplotka/bingo@latest
ls -l $GOPATH/bin
echo $PATH
- name: Install Prometheus using bingo
run: |
bingo get prometheus
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Run unit tests
run: make test-local
codespell:
runs-on: ubuntu-latest
name: Check misspelled words
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run codespell
uses: codespell-project/actions-codespell@v2
with:
check_filenames: false
check_hidden: true
skip: ./pkg/ui/*,./pkg/store/6545postingsrepro,./internal/*,./mixin/vendor/*,./.bingo/*,go.mod,go.sum
ignore_words_list: intrumentation,mmaped,nd,ot,re-use,ser,serie,sme,sudu,tast,te,ans
e2e:
strategy:
fail-fast: false
matrix:
parallelism: [8]
index: [0, 1, 2, 3, 4, 5, 6, 7]
runs-on: ubuntu-latest
name: Thanos end-to-end tests
env:
GOBIN: /tmp/.bin
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Go.
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.x
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Run e2e docker-based tests
run: make test-e2e GH_PARALLEL=${{ matrix.parallelism }} GH_INDEX=${{ matrix.index }}