Running k6 inside CircleCI pipeline

Hi there,

I have already k6 cloud (free) account and CircleCI configured to run k6 there along with the existing workflows, orbs etc (not grafana/k6 orb).

I think it is possible to use k6 cloud for free just to transfer the output results there from k6 testing in CircleCI?

So, I would like to configure my CircleCI pipeline (.circleci/config.yml) and I already set K6_CLOUD_TOKEN variable in CircleCI.

What else I need to do in order to make this happen? I tried to just put cloud: true in my workflow in config.yml, but then I have failed CI pipeline saying that cloud is not permitted to use (extraneous key [cloud] is not permitted).

As mentioned, I have jobs, workflows… but for a single performance_tests workflow I would like to transfer every test run to k6 cloud, if possible.

Example job:

performance_tests:
    working_directory: /home/circleci/project
    machine:
      image: ubuntu-2204:2022.10.2
      docker_layer_caching: false
    parameters:
      mysql_command:
        type: string
        default: ''
      mysql_image:
        type: string
        default: ''
      wordpress_image_version:
        type: string
        default: ''
      url:
        type: string
        default: 'http://localhost:9500'
      pw:
        type: string
        default: 'password'
      scenario:
        type: string
        default: 'pullrequests'
    steps:....
    .. .. ..

Ok, I fixed it. Followed this doc:

2 Likes