pkg/services/otelhealth: fix uptime_seconds metric type from Gauge to… #1369
Workflow file for this run
This file contains hidden or 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
| name: Keystore Checks | |
| permissions: | |
| contents: read | |
| on: [push, merge_group] | |
| jobs: | |
| changes: | |
| name: detect changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| keystore-src: ${{ steps.keystore-changes.outputs.src }} | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: keystore-changes | |
| with: | |
| filters: | | |
| src: | |
| - 'keystore/**' | |
| run-tests: | |
| name: run tests | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.keystore-src == 'true' | |
| defaults: | |
| run: | |
| working-directory: keystore | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: ./.github/actions/setup-go | |
| with: | |
| go-version-file: "go.mod" | |
| restore-build-cache-only: "false" | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Unit Tests | |
| run: go test ./... -coverpkg=./... -coverprofile=coverage.txt | |
| build-race-tests: | |
| name: race tests | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.keystore-src == 'true' | |
| defaults: | |
| run: | |
| working-directory: keystore | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: ./.github/actions/setup-go | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Race Tests | |
| run: GORACE="log_path=$PWD/race" go test -race ./... | |
| - name: Print Races | |
| if: failure() | |
| id: print-races | |
| run: | | |
| find race.* | xargs cat > race.txt | |
| if [[ -s race.txt ]]; then | |
| cat race.txt | |
| fi | |
| - name: Upload Go test results | |
| if: always() | |
| uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
| with: | |
| name: go-race-results | |
| path: | | |
| ./race.* | |
| gate: | |
| name: summary gate | |
| runs-on: ubuntu-latest | |
| needs: [changes, run-tests, build-race-tests] | |
| if: always() | |
| steps: | |
| - name: Fail if any job ran and failed | |
| if: needs.changes.outputs.keystore-src == 'true' && | |
| (needs.run-tests.result != 'success' || | |
| needs.build-race-tests.result != 'success') | |
| run: exit 1 | |