Skip to content

[k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests#12265

Open
deyankiteworks wants to merge 7 commits intomasterfrom
OCISDEV-827
Open

[k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests#12265
deyankiteworks wants to merge 7 commits intomasterfrom
OCISDEV-827

Conversation

@deyankiteworks
Copy link
Copy Markdown
Member

@deyankiteworks deyankiteworks commented Apr 27, 2026

Summary

  • Add a new GitHub Actions workflow (.github/workflows/k6-load-test.yml) that replicates the existing Drone CI k6 load test pipeline
  • Triggers on PRs with "k6-test" in the title (case-insensitive), daily schedule, or manual dispatch
  • Reuses the existing tests/config/drone/run_k6_tests.sh script with the same SSH-based remote execution model

Details

Migrates the k6 load test pipeline from Drone (.drone.star k6LoadTests function) to GitHub Actions:

  • Runs in owncloudci/alpine:latest container (same image as Drone)
  • Maps 7 Drone secrets to GitHub Actions secrets (SSH_OCIS_REMOTE, SSH_OCIS_USERNAME, SSH_OCIS_PASSWORD, TEST_SERVER_URL, SSH_K6_REMOTE, SSH_K6_USERNAME, SSH_K6_PASSWORD)
  • Replaces Drone-specific DRONE_COMMIT env var with OCIS_COMMIT_SHA set from github.event.pull_request.head.sha || github.sha
  • OCIS log retrieval and Grafana dashboard link steps run on success or failure (if: always())
  • Adds OCIS health check (polls /.well-known/openid-configuration via SSH on the OCIS remote, up to 120s) before starting k6 tests
  • Adds SSH keepalive (ServerAliveInterval=60, ServerAliveCountMax=10) to prevent broken pipe disconnects during long test runs

Test plan

  • Verify the 7 GitHub secrets are created in repo Settings > Secrets and variables > Actions
  • Open a PR with "k6-test" in the title — workflow should trigger and job should run
  • Open a PR without "k6-test" — workflow triggers but job is skipped
  • Edit a PR title to add "k6-test" — workflow re-triggers via edited event
  • Test workflow_dispatch from the Actions tab
  • Verify "Waiting for OCIS to be ready" / "OCIS is ready" messages appear in logs
  • Verify SSH session survives the full k6 test run without broken pipe

🤖 Generated with Claude Code

@update-docs
Copy link
Copy Markdown

update-docs Bot commented Apr 27, 2026

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@deyankiteworks deyankiteworks changed the title ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests [k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests Apr 27, 2026
@deyankiteworks deyankiteworks self-assigned this Apr 27, 2026
@deyankiteworks deyankiteworks changed the title [k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests Apr 27, 2026
@deyankiteworks deyankiteworks changed the title ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests [k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests Apr 27, 2026
@deyankiteworks deyankiteworks changed the title [k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests Apr 28, 2026
@deyankiteworks deyankiteworks changed the title ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests [k6-test] ci: [OCISDEV-827] Add GitHub Actions workflow for k6 load tests Apr 28, 2026
@deyankiteworks deyankiteworks requested review from LukasHirt and removed request for kobergj April 29, 2026 07:47
@deyankiteworks deyankiteworks enabled auto-merge (squash) April 29, 2026 08:14
Copy link
Copy Markdown
Contributor

@LukasHirt LukasHirt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest also adding concurrency to this. Since it's using ssh connections to real servers which are shared for all the runs, I would make sure that only one workflow is doing that at a time.

Comment thread .github/workflows/k6-load-test.yml
types: [opened, synchronize, reopened, edited]
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea for future. We can collect some args using workflow_dispatch so we could collect a branch name and then we could trigger via GH UI the K6 tests on a latest commit in a specific branch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I will add it in a separate JIRA taks to postpone it for the next sprint.

Comment thread .github/workflows/k6-load-test.yml
Comment thread .github/workflows/k6-load-test.yml
Comment thread .github/workflows/k6-load-test.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants