How to user k6 typescript in gitlab CI

In my GitLab CI I wanted to use yarn

  stage: Load tests
  interruptible: true
  when: manual
    name: loadimpact/k6:latest
    entrypoint: ['']

Hi @Dinkar

Welcome to the community forum :wave:

Can you provide a bit more details on your needs?

  • Can you share an example of a (sanitize) script?
  • Can you share a bit more details about your yarn needs.
    • Are there dependencies that the k6 docker image needs installed in order to execute the tests?
    • Have you tried to use yarn in your GitLab CI pipeline? Can you share details on the configuration you are attempting?

I’m hoping with a bit more details we’ll be able to advice.

We do have a template to showcase how to run typescript in GitHub - grafana/k6-template-typescript: Template to use TypeScript with k6. However, I’m not sure where you need yarn and if this will have any impact when running Gitlab CI, and some more context will help.