grafana / quickpizza

Pizza, pizza, pizza!
https://quickpizza.grafana.com/
Apache License 2.0
58 stars 12 forks source link

Add GH action for k6 tests #51

Closed ppcano closed 9 months ago

ppcano commented 9 months ago

This PR adds a GH action to validate most of the k6 tests in this repo against the latest Quickpizza docker image.

The GH action executes run-tests.sh, which accepts a glob pattern to choose the tests to run. The implementation is based on the work of @2steaks on this repo (Thank you!).

Note that the current k6 GitHub action only allow passing a single test file. Thus, it is cumbersome to use this action for running multiple tests, as each test requires its own job step. We should update it to support glob patterns!

This action allow using ACT to run it in your local machine. For Apple Silicon Macs, you have to:

  1. Enable the option on Docker Desktop: Use Rosetta for x86/amd64 emulation on Apple Silicon
  2. Run ACT using the --container-architecture linux/amd64 flag. For example: act -W .github/workflows/k6-tests.yaml --container-architecture linux/amd64