update hurl to 5.0.1

This commit is contained in:
Mohammed Al Sahaf 2024-09-09 08:29:23 +00:00 committed by GitHub
parent 3bdc6c035a
commit 8d2ed344c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,30 +129,6 @@ jobs:
go test -tags nobadger -v -coverprofile="cover-profile.out" -short -race ./...
# echo "status=$?" >> $GITHUB_OUTPUT
- name: Install Hurl
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' && matrix.go == '1.22'
run: |
./cmd/caddy/caddy start
- name: Run tests with Hurl
if: matrix.os == 'linux' && matrix.go == '1.22'
run: |
mkdir hurl-report
find . -name *.hurl -exec hurl --variables-file caddytest/spec/hurl_vars.properties --very-verbose --verbose --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
# run: |
@ -168,6 +144,91 @@ jobs:
# echo "step_test ${{ steps.step_test.outputs.status }}\n"
# exit 1
spec-test:
permissions:
checks: write
pull-requests: write
strategy:
matrix:
os:
- linux
go:
- '1.23'
include:
# Set the minimum Go patch version for the given Go minor
# Usable via ${{ matrix.GO_SEMVER }}
- go: '1.23'
GO_SEMVER: '~1.23.0'
# Set some variables per OS, usable via ${{ matrix.VAR }}
# OS_LABEL: the VM label from GitHub Actions (see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories)
# CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing
# SUCCESS: the typical value for $? per OS (Windows/pwsh returns 'True')
- os: linux
OS_LABEL: ubuntu-latest
CADDY_BIN_PATH: ./cmd/caddy/caddy
SUCCESS: 0
runs-on: ${{ matrix.OS_LABEL }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.GO_SEMVER }}
check-latest: true
- name: Print Go version and environment
id: vars
shell: bash
run: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nSystem environment:\n\n"
env
printf "Git version: $(git version)\n\n"
# Calculate the short SHA1 hash of the git commit
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get dependencies
run: |
go get -v -t -d ./...
# mkdir test-results
- name: Build Caddy
working-directory: ./cmd/caddy
env:
CGO_ENABLED: 0
run: |
go build -tags nobadger -trimpath -ldflags="-w -s" -v
- name: Install Hurl
env:
HURL_VERSION: "5.0.1"
run: |
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/${HURL_VERSION}/hurl_${HURL_VERSION}_amd64.deb
sudo dpkg -i hurl_${HURL_VERSION}_amd64.deb
- name: Run Caddy
run: |
./cmd/caddy/caddy start
- name: Run tests with Hurl
run: |
mkdir hurl-report
find . -name *.hurl -exec hurl --variables-file caddytest/spec/hurl_vars.properties --very-verbose --verbose --test --report-junit hurl-report/junit.xml --color {} \;
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
hurl-report/junit.xml
s390x-test:
name: test (s390x on IBM Z)
runs-on: ubuntu-latest