Add step to dump directory listing after sparse checkout #3
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "actions-sandbox" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out prometheus-remote-backfill code | |
uses: actions/checkout@v4 | |
- name: Check out Yugabyte metrics collection level definitions | |
uses: actions/checkout@v4 | |
with: | |
path: 'yugabyte-db' | |
repository: 'yugabyte/yugabyte-db' | |
sparse-checkout: | | |
managed/src/main/resources/metric/*_level_params.json | |
sparse-checkout-cone-mode: false | |
- name: Verify checkout | |
run: 'ls yugabyte-db/managed/src/main/resources/metric/*_level_params.json' | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.19 | |
cache-dependency-path: "**/go.sum" | |
- name: Build promdump | |
working-directory: ./promdump | |
run: | | |
go get | |
go build -ldflags=" -X 'main.CommitHash=$(git rev-parse HEAD)' -X 'main.BuildTime=$(date -Iseconds)'" -v ./... | |
- name: Test promdump | |
working-directory: ./promdump | |
run: go test -v ./... | |
- name: Build promremotewrite | |
working-directory: ./promremotewrite | |
run: | | |
go get | |
go build -ldflags=" -X 'main.CommitHash=$(git rev-parse HEAD)' -X 'main.BuildTime=$(date -Iseconds)'" -v ./... | |
- name: Test promremotewrite | |
working-directory: ./promremotewrite | |
run: go test -v ./... | |
- name: Compress artifacts | |
run: | | |
gzip promdump/promdump | |
gzip promremotewrite/promremotewrite | |
- name: Upload promdump | |
uses: actions/upload-artifact@v4 | |
with: | |
name: promdump | |
path: promdump/promdump.gz | |
- name: Upload promremotewrite | |
uses: actions/upload-artifact@v4 | |
with: | |
name: promremotewrite | |
path: promremotewrite/promremotewrite.gz |