Skip to content

Instantly share code, notes, and snippets.

@jaydorsey
Created June 7, 2022 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaydorsey/c7c94f06a93c0166bea11287f9dfe4fb to your computer and use it in GitHub Desktop.
Save jaydorsey/c7c94f06a93c0166bea11287f9dfe4fb to your computer and use it in GitHub Desktop.
Using hurl.dev for integration tests
---
name: Run Integration Tests
on: [workflow_dispatch]
# .github/workflows/integration.yml
#
# You manually trigger this from your Github actions. Maybe after merging to main, and triggering
# a deploy out to your pre-production environment
#
# The purpose of this is to basically automate/document some low-hanging integration tests that
# you can eye-ball before a production deploy.
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Integration test
run: |
curl -LO https://github.com/Orange-OpenSource/hurl/releases/download/1.4.0/hurl_1.4.0_amd64.deb
sudo dpkg -i hurl_1.4.0_amd64.deb
hurl hurl/*.hurl --test
# hurl/health.hurl
#
# Do a health check against my staging site
GET https://my-staging-site.com/health
HTTP/1.1 200
[Asserts]
jsonpath "$.healthy" == true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment