mirror of
https://github.com/grafana/setup-k6-action.git
synced 2026-10-23 04:46:11 +03:00
- TypeScript 94.3%
- JavaScript 5.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github/workflows | ||
| dev | ||
| dist | ||
| src | ||
| .gitignore | ||
| .node-version | ||
| .npmrc | ||
| .yarnrc | ||
| .yarnrc.yml | ||
| action.yaml | ||
| catalog-info.yaml | ||
| CODEOWNERS | ||
| k6.gif | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| renovate.json | ||
| tsconfig.json | ||

Open source performance testing tool and SaaS for ambitious engineering teams.
setup-k6-action
This action sets up a Grafana k6 environment for use in a GitHub Actions workflow by:
- Installing a specific version of k6.
- Installing Chrome for Browser Testing (optional).
After that we can use the run-k6-action to execute the k6 tests in the GitHub Actions workflow.
Inputs
The following inputs can be used as step.with key:
| Name | Type | Required | Description |
|---|---|---|---|
k6-version |
string | false |
Specify the k6 version to use. e.g. '0.49.0'. If not set, latest k6 version will be used. |
browser |
boolean | false |
Default false. If set to true chrome is also installed along with k6 for Browser testing. |
Usage
Following are some examples of using the workflow.
Basic
Uses the latest k6 version
on:
push:
jobs:
protocol:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: grafana/setup-k6-action@v1
- uses: grafana/run-k6-action@v1
with:
path: |
./tests/api*.js
Specify which k6 version to use
on:
push:
jobs:
protocol:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: grafana/setup-k6-action@v1
with:
k6-version: '0.49.0'
- uses: grafana/run-k6-action@v1
with:
path: |
./tests/api*.js
Browser Testing
on:
push:
jobs:
protocol:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: grafana/setup-k6-action@v1
with:
k6-version: '0.49.0'
browser: true
- uses: grafana/run-k6-action@v1
with:
path: |
./tests/api*.js