Created
June 7, 2022 18:17
-
-
Save jaydorsey/c7c94f06a93c0166bea11287f9dfe4fb to your computer and use it in GitHub Desktop.
Using hurl.dev for integration tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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