Announcing the Artillery GitHub Action
You can use the artilleryio/action-cli
to set up load testing faster in your new or existing GitHub workflows. We designed the action to mirror our CLI so you get a consistent experience no matter how you decide to use Artillery.
Start small with tests running directly in your GitHub workflows, or scale out on your AWS Lambda and AWS Fargate.
Usage example
The best way to illustrate our new GitHub action is to see it in practice.
Let’s write a simple workflow that makes sure all load tests pass on the staging environment before promoting it to production.
# .github/workflows/prod-deploy.yml
name: prod-deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load tests
id: load-test
uses: artilleryio/action-cli@v1
with:
# Run load tests against the current staging environment
# as the candidate for the production deployment.
command: run ./staging.test.yml
- name: Deploy
# Require the load tests to pass before deploying to production.
needs: [load-test]
run: ./deploy.sh
The GitHub action pairs perfectly with Artillery Cloud, where you can preview all your test runs, see the visualized metrics, and share them with your team.
Join the waitlist for Artillery Cloud to get an early access to the platform!
Documentation
Learn more about Using Artillery on GitHub Actions, and see other examples, such as scheduled runs that make sure your application is always ready for the next traffic spike.
And don’t hesitate to reach out or ask a question whenever you have one. We are here to help you test better.