{"id":15177802,"url":"https://github.com/grafana/k6-action","last_synced_at":"2025-10-01T18:32:04.886Z","repository":{"id":43258015,"uuid":"259590170","full_name":"grafana/k6-action","owner":"grafana","description":"[Archived] Legacy k6 GitHub Action","archived":true,"fork":false,"pushed_at":"2024-07-16T09:40:46.000Z","size":599,"stargazers_count":123,"open_issues_count":7,"forks_count":21,"subscribers_count":141,"default_branch":"main","last_synced_at":"2024-10-22T03:23:39.207Z","etag":null,"topics":["actions","k6","load-testing","performance-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grafana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-28T09:23:46.000Z","updated_at":"2024-09-29T10:26:02.000Z","dependencies_parsed_at":"2024-04-02T11:48:40.497Z","dependency_job_id":"f214beac-fefb-4174-a21a-38bde5da5c7e","html_url":"https://github.com/grafana/k6-action","commit_stats":{"total_commits":36,"total_committers":10,"mean_commits":3.6,"dds":0.4722222222222222,"last_synced_commit":"1e9c55046702f865e9a66c44c1004f47f4d01922"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fk6-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fk6-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fk6-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fk6-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/k6-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234892715,"owners_count":18902907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","k6","load-testing","performance-testing"],"created_at":"2024-09-27T15:00:19.946Z","updated_at":"2025-10-01T18:31:59.573Z","avatar_url":"https://github.com/grafana.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ⚠️ This action has been archived and is no longer maintained. \n\u003e \n\u003e Please use the [Setup K6 Action](https://github.com/grafana/setup-k6-action) and [Run K6 Action](https://github.com/grafana/run-k6-action) instead. To learn about using the new GitHub actions, check out the [tutorial on using Grafana k6 and GitHub Actions](https://grafana.com/blog/2024/07/15/performance-testing-with-grafana-k6-and-github-actions/).  \n\n# k6-action\n\n### See also\n- [Performance testing with Grafana k6 and GitHub Actions](https://grafana.com/blog/2024/07/15/performance-testing-with-grafana-k6-and-github-actions/)\n\n### Local test\n\n```yaml\nname: Main Workflow\non: [push]\njobs:\n  build:\n    name: Run k6 test\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Run k6 local test\n        uses: grafana/k6-action@v0.3.1\n        with:\n          filename: my-load-test.js\n          flags: --vus 50 --duration 10s\n```\n\n### Cloud test\n\n```yml\nname: Main Workflow\non: [push]\njobs:\n  build:\n    name: Run k6 test\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Run k6 cloud test\n        uses: grafana/k6-action@v0.3.1\n        with:\n          filename: my-load-test.js\n          flags: --vus 50 --duration 10s\n          cloud: true\n          token: ${{ secrets.K6_CLOUD_API_TOKEN }}\n```\n\n### Inputs\n\n#### Filename\n\n```yaml\nsteps:\n  - name: Run k6 local test\n    uses: grafana/k6-action@v0.3.1\n    with:\n      filename: my-script-file.js\n```\n\nSets the filename of the test script to execute. This property is relative to the workspace directory. If omitted, it defaults to `test.js`.\n\n#### Cloud\n\n```yaml\nenvironment: test\n\nsteps:\n  - name: Run k6 cloud test\n    uses: grafana/k6-action@v0.3.1\n    with:\n      cloud: true\n      token: ${{ secrets.K6_CLOUD_API_TOKEN }}\n```\n\nEnables execution in Grafana Cloud k6. Additional details on the k6 cloud offering are available at [https://grafana.com/docs/grafana-cloud/k6/](https://grafana.com/docs/grafana-cloud/k6/).\n\nYou can use a Grafana Cloud k6 personal API token, or a Grafana Stack API token. For more details, refer to [Authenticate on the CLI](https://grafana.com/docs/grafana-cloud/k6/author-run/tokens-and-cli-authentication/#authenticate-on-the-cli).\n\n#### Flags\n\n```yaml\nsteps:\n  - name: Run k6 local test\n    uses: grafana/k6-action@v0.3.1\n    with:\n      flags: --vus 50 --duration 10s\n```\n\nAny additional arguments or flags to pass to the k6 CLI. The full list of possible options is available at https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/.\n\nFor additional information, and help getting started, see https://grafana.com/docs/k6/latest/get-started/running-k6/.\n\n#### Environment Variables\n\nEnvironment variables can be added the same way as you do it [locally](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#supply-environment-variables), using the [`flags` action option](https://github.com/grafana/k6-action#flags):\n\n```yaml\nsteps:\n  - name: Run k6 local test\n    uses: grafana/k6-action@v0.3.1\n    with:\n      filename: my-script-file.js\n      flags: --env MY_VAR=42\n```\n\nOr can be scoped to the action step:\n\n```yaml\nsteps:\n  - name: Run k6 local test\n    uses: grafana/k6-action@v0.3.1\n    with:\n      filename: my-script-file.js\n    env:\n      MY_VAR: 42\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fk6-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Fk6-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fk6-action/lists"}