Skip to content

[chore] configure renovate to update go versions automatically #2

[chore] configure renovate to update go versions automatically

[chore] configure renovate to update go versions automatically #2

Workflow file for this run

name: load-tests
on:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
paths-ignore:
- "**/README.md"
# 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
# renovate: datasource=golang-version depName=go
GO_VERSION: "1.22.9"
jobs:
setup-environment:
timeout-minutes: 30
runs-on: self-hosted
if: ${{ github.actor != 'dependabot[bot]' }}
outputs:
loadtest_matrix: ${{ steps.splitloadtest.outputs.loadtest_matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
~/.cache/go-build
key: loadtest-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install Dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- run: make genoteltestbedcol
- run: make oteltestbedcol
- name: Upload Testbed Binaries
uses: actions/upload-artifact@v4
with:
name: testbed-binaries
path: ./bin/*
- name: Split Loadtest Jobs
id: splitloadtest
run: ./.github/workflows/scripts/setup_e2e_tests.sh
loadtest:
runs-on: self-hosted
needs: [setup-environment]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup-environment.outputs.loadtest_matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
~/.cache/go-build
key: loadtest-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install Dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- run: mkdir -p results && touch results/TESTRESULTS.md
- name: Download Testbed Binaries
uses: actions/download-artifact@v4
with:
name: testbed-binaries
path: bin/
- run: chmod +x bin/*
- name: Loadtest
run: make -C testbed run-tests
env:
TEST_ARGS: "-test.run=${{ matrix.test }}"
- name: Set results filename
if: ${{ failure() || success() }}
id: filename
run: echo "name=$(echo '${{ matrix.test }}' | sed -e 's/|/_/g')" >> $GITHUB_OUTPUT
- name: Create Test Result Archive
if: ${{ failure() || success() }}
continue-on-error: true
run: tar -cvf test_results_${{steps.filename.outputs.name}}.tar testbed/tests/results
- name: Upload Test Results
if: ${{ failure() || success() }}
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-result-archive-${{steps.filename.outputs.name}}
path: ./*.tar
- run: cp testbed/tests/results/benchmarks.json testbed/tests/results/${{steps.filename.outputs.name}}.json
- name: Upload benchmarks.json
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{steps.filename.outputs.name}}
path: testbed/tests/results/${{steps.filename.outputs.name}}.json
update-benchmarks:
runs-on: ubuntu-latest
needs: [loadtest]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: benchmark-results-*
merge-multiple: true
path: results
- run: jq -s 'map(.[])' results/*.json > output.json
- uses: benchmark-action/github-action-benchmark@v1
with:
tool: "customSmallerIsBetter"
output-file-path: output.json
gh-pages-branch: benchmarks
max-items-in-chart: 100
github-token: ${{ secrets.GITHUB_TOKEN }}
benchmark-data-dir-path: "docs/benchmarks/loadtests"
auto-push: true