What you will learn in this TP
- Write a smoke test for CI
- Create the workflow
- Observe a blocked pull request
Introduction #
What you will learn in this section
- Write a smoke test for CI
- Create the workflow
- Observe a blocked pull request
Context. A performance regression reached production last month. From now on, no pull request may degrade latency beyond the SLO.
Prerequisites: GitHub account, test repository · Estimated time: 40 min
Performance tested on every change.Hands-on #
Guided steps, with their solutions.
1. Prepare the repository
Why? The test lives next to the code it protects.
In a repository, createdocker-compose.yml(httpbin on port 8080) andtests/perf/smoke.js(10 VUs, 30 s, thresholds p95 < 300 ms and failures < 1%) targetinghttp://localhost:8080/get.2. Write the workflow
Why? The official actions install k6 and run the script; an unmet threshold fails the job.
Create.github/workflows/perf.yml, triggered on pull requests.3. Open a healthy pull request
Why? To check the nominal path.
Push to a branch and open a pull request: the job should succeed.4. Simulate a regression
Why? Proof that the safeguard works.
Change the tested route to/delay/1(simulating slower code), push and observe the result.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Observing a k6 test: Prometheus, Grafana and correlation with the system under test
Send k6 results to Prometheus (remote write) or via OpenTelemetry, visualize them in Grafana and ...
End-to-end CI/CD (5/5): GitHub Actions, GitLab CI, Jenkins and Argo CD in practice
Compare and use CI/CD tools: GitHub Actions, GitLab CI, Jenkins, Argo CD and Flux; a complete pip...
Grafana Alloy: Continuous Profiling with Pyroscope
Discover how to configure continuous profiling in your environments using Grafana Alloy and Pyros...
Ansible: going further (testing, quality, CI/CD and performance)
Industrialize Ansible: ansible-lint, yamllint, Molecule, continuous integration, collections, exe...
HAProxy in Kubernetes: the high-performance Ingress Controller
Discover in depth how HAProxy integrates with Kubernetes: direct-to-pod architecture, hot update ...
Advanced infrastructure with Datadog: network, cloud, containers and databases
Monitor infrastructure beyond hosts: Network Performance Monitoring, AWS, Azure and GCP integrati...
Git for DevOps: branches, code reviews and versions
Organize work with Git in a DevOps approach: trunk-based development or GitFlow, short-lived bran...
Real User Monitoring (RUM) and Core Web Vitals: measuring what users experience
Why observe the front end, what RUM measures, Core Web Vitals (LCP, INP, CLS) and their threshold...
Browser testing and synthetic monitoring with k6
Test a web application in a real browser with the k6 browser module, measure Core Web Vitals, and...