Menu
Documentationbreadcrumb arrow Grafana Cloudbreadcrumb arrow What's new in Grafana Cloudbreadcrumb arrow Integrate Grafana Cloud k6 into your CI/CD pipeline with new k6 GitHub Actions
Grafana Cloud
← Back to What's new

Integrate Grafana Cloud k6 into your CI/CD pipeline with new k6 GitHub Actions

Generally AvailableK6
Release date: 2024-07-29

We have released two new k6 GitHub actions to make it easier to automate your Grafana Cloud k6 performance testing suite and projects.

You can now use the setup-k6-action to install a specific k6 version in your CI/CD workflow. This action provides flexibility when running multiple testing projects and faster execution of testing jobs.

With the new run-k6-action, you can:

  • Run local and cloud tests, as well as upload test results to Grafana Cloud k6.
  • Execute browser tests, hybrid performance tests, and pass CLI flags.
  • Select which tests to run using Glob patterns.
  • Choose between parallel or sequential test execution when running multiple tests.
  • Configure whether the job fails as soon as the first test fails or continues executing the remaining tests.
  • Automatically add links to Grafana Cloud k6 results in PR comments for easier access and review.

For example, here’s a GitHub workflow snippet using the new actions:

yaml
on:
  push:

jobs:
  protocol:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: grafana/setup-k6-action@v1
      - uses: grafana/run-k6-action@v1
        with:
          path: |
            ./tests/api*.js

To learn more, refer to this blog post and the following video demo: