Skip to content

Commit

Permalink
generate coverage profile
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed90 authored Oct 29, 2024
1 parent 7ea59f0 commit 755c510
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
env:
CGO_ENABLED: 0
run: |
go build -tags nobadger -trimpath -ldflags="-w -s" -v
go build -cover -tags nobadger,nopgx,nomysql -trimpath -ldflags="-w -s" -v
- name: Install Hurl
env:
Expand All @@ -217,6 +217,9 @@ jobs:
- name: Run Caddy
run: |
./cmd/caddy/caddy environ
mkdir coverdir
export GOCOVERDIR=./coverdir
./cmd/caddy/caddy start
- name: Run tests with Hurl
Expand All @@ -230,6 +233,20 @@ jobs:
files: |
hurl-report/junit.xml
- name: Generate Coverage Data
run: |
./cmd/caddy/caddy stop
go tool covdata textfmt -i=coverdir -o hurl-report/cover-profile.txt
go tool cover -html churl-report/cover-profile.txt -o hurl-report/cover.html
- name: Publish Coverage Profile
uses: actions/upload-artifact@v4
with:
name: caddy_cover_${{ steps.vars.outputs.short_sha }}.html
path: "./hurl-report/cover.html"
compression-level: 0

s390x-test:
name: test (s390x on IBM Z)
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions caddytest/spec/http/requestbody/spec.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ http://localhost:8000 {

GET https://localhost:9443
[Options]
delay: 1s
insecure: true
```
Hello
Expand Down

0 comments on commit 755c510

Please sign in to comment.