test: add rest param #3
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
name: prometheus-compliance-tests | ||
on: | ||
# push: | ||
# branches: [ main ] | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
pull_request: | ||
# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
env: | ||
# Make sure to exit early if cache segment download times out after 2 minutes. | ||
# We limit cache download as a whole to 5 minutes. | ||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 | ||
jobs: | ||
prometheus-compliance-tests: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: opentelemetry-collector-contrib | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ~1.20.7 | ||
cache: false | ||
- name: Cache Go | ||
id: go-cache | ||
timeout-minutes: 5 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/bin | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: prometheus-${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }} | ||
- run: make otelcontribcol | ||
working-directory: opentelemetry-collector-contrib | ||
- name: Checkout compliance repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: prometheus/compliance | ||
path: compliance | ||
ref: f0482884578bac67b053e3eaa1ca7f783d146557 | ||
- name: Copy binary to compliance directory | ||
run: mkdir compliance/remote_write_sender/bin && cp opentelemetry-collector-contrib/bin/otelcontribcol_linux_amd64 compliance/remote_write_sender/bin/otelcol_linux_amd64 | ||
- name: Run compliance tests | ||
run: go test -v --tags=compliance -run "TestRemoteWrite/otel/.+" ./ |& tee ./test-report.txt | ||
working-directory: compliance/remote_write_sender |