A GitHub Action that automatically triggers API tests on the Devzery testing platform. Seamlessly integrate API testing into your CI/CD pipeline by running comprehensive API test suites whenever code changes are pushed to your repository.
To view the test results visit the Devzery Dashboard
- Automated API Testing: Trigger comprehensive API test suites on the Devzery platform
- CI/CD Integration: Seamlessly integrate API testing into your GitHub workflows
- Secure Authentication: Built-in support for Devzery API key authentication
- Test Configuration: Support for custom test and workflow configurations
- Real-time Results: Get detailed test results and flow tracking
- Error Handling: Comprehensive error handling with detailed logging
- Flexible Triggers: Run tests on push, pull requests, releases, or scheduled intervals
To start using this GitHub Action in your workflows:
- Add the action to your workflow YAML file:
- name: Trigger Backend API
uses: devzery/devzery-action@v1
with:
api-key: ${{ secrets.API_KEY }}-
Set your API key securely in your repository settings under Settings > Secrets and variables > Actions > New repository secret.
-
Optional: Install dependencies and build locally for testing:
npm install
npm run build| Input | Description | Required | Default |
|---|---|---|---|
api-key |
Your Devzery API key for authentication | β | - |
payload |
Additional JSON payload to send with the test trigger | β | {} |
headers |
Additional headers as JSON string | β | {} |
timeout |
Request timeout in milliseconds | β | 30000 |
workflow-config |
Devzery workflow configuration as JSON string | β | {} |
test-config |
Devzery test configuration as JSON string | β | {} |
| Output | Description |
|---|---|
status-code |
The HTTP status code of the response |
success |
Whether the API test execution was successful (true/false) |
flow-id |
The unique flow ID returned by Devzery for tracking test execution |
name: Run API Tests on Push
on:
push:
branches: [ main, develop ]
jobs:
api-tests:
runs-on: ubuntu-latest
steps:
- name: Trigger Devzery API Tests
uses: devzery/devzery-action@v1
with:
api-key: ${{ secrets.DEVZERY_API_KEY }}name: Comprehensive API Testing
on:
pull_request:
branches: [ main ]
release:
types: [published]
jobs:
devzery-api-tests:
runs-on: ubuntu-latest
steps:
- name: Run Devzery API Test Suite
id: api-tests
uses: devzery/devzery-action@v1
with:
api-key: ${{ secrets.DEVZERY_API_KEY }}
timeout: 120000
- name: Process Test Results
if: always()
run: |
echo "Test execution status: ${{ steps.api-tests.outputs.success }}"
echo "Flow ID for tracking: ${{ steps.api-tests.outputs.flow-id }}"
echo "Response: ${{ steps.api-tests.outputs.response }}"
if [ "${{ steps.api-tests.outputs.success }}" = "false" ]; then
echo "API tests failed! Check Devzery dashboard for details."
exit 1
finame: Scheduled API Health Check
on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
jobs:
health-check:
runs-on: ubuntu-latest
steps:
- name: Run Devzery Health Check Tests
uses: devzery/devzery-action@v1
with:
api-key: ${{ secrets.DEVZERY_API_KEY }}
timeout: 60000- Never commit API keys to your repository. Always use GitHub Secrets.
- Store your Devzery API key as
DEVZERY_API_KEYin your repository secrets. - API keys and sensitive data are never logged or exposed in the workflow output.
When triggering API tests, the action automatically includes GitHub workflow context in the payload sent to Devzery:
{
"your_custom_payload": "here",
"workflow_config": {},
"test_config": {},
"github_context": {
"repository": {
"owner": "your-username",
"repo": "your-repo"
},
"ref": "refs/heads/main",
"sha": "abc123...",
"actor": "username",
"workflow": "API Testing Pipeline",
"job": "api-tests",
"run_id": 123456789,
"run_number": 42,
"event_name": "push"
}
}npm install
npm run build- Node.js 20+
- A valid Devzery account and API key
- Properly configured API endpoints and tests in your Devzery dashboard
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Weβre actively improving the API Trigger GitHub Action. Hereβs what weβre planning next:
β’β β π Support for additional authentication methods (e.g., Basic Auth, OAuth) β’β β π Retry mechanism for failed API calls β’β β π§ͺ Built-in test API endpoint support β’β β π¦ Marketplace improvements (badges, stats) β’β β π Enhanced response visualization in workflow output β’β β π§© Plugin support for common CI/CD tools
Have feature requests? Open an issue or start a discussion on GitHub!
This action is available on the GitHub Marketplace. You can also find it by searching for "Devzery API Testing" in the Actions tab of your repository.
Made with β€οΈ by Devzery