Skip to content

Commit

Permalink
add report
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed90 committed Apr 19, 2024
1 parent 221d90a commit d9ab72d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:

jobs:
test:
permissions:
checks: write
strategy:
# Default is true, cancels jobs for other platforms in the matrix if one fails
fail-fast: false
Expand Down Expand Up @@ -127,20 +129,29 @@ jobs:
# echo "status=$?" >> $GITHUB_OUTPUT
- name: Install Hurl
if: matrix.os == 'linux'
if: matrix.os == 'linux' && matrix.go == '1.22'
run: |
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/4.2.0/hurl_4.2.0_amd64.deb
sudo dpkg -i hurl_4.2.0_amd64.deb
- name: Run Caddy
if: matrix.os == 'linux'
if: matrix.os == 'linux' && matrix.go == '1.22'
working-directory: ./cmd/caddy
run: |
./caddy start
- name: Run tests with Hurl
if: matrix.os == 'linux'
if: matrix.os == 'linux' && matrix.go == '1.22'
run: |
find . -name *.hurl -exec hurl --test --color {} \;
mkdir hurl-report
find . -name *.hurl -exec hurl --test --report-junit hurl-report/junit.xml --color {} \;
- name: Publish Test Results
if: matrix.os == 'linux' && matrix.go == '1.22'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
hurl-report/junit.xml
# Relevant step if we reinvestigate publishing test/coverage reports
# - name: Prepare coverage reports
Expand Down
22 changes: 22 additions & 0 deletions caddytest/spec/http/headers/spec.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Configure Caddy
POST http://localhost:2019/load
User-Agent: hurl/ci
Content-Type: text/caddyfile
```
{
skip_install_trust
http_port 9080
https_port 9443
local_certs
}
localhost {
header X-Custom-Header "Custom-Value"
}
```

GET https://localhost:9443
[Options]
insecure: true
HTTP 200
[Asserts]
header "X-Custom-Header" == "Custom-Value"

0 comments on commit d9ab72d

Please sign in to comment.