From af02b5cf0a9ba16d1d37a86dbd97a7ef50c64eb9 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Tue, 9 May 2023 21:35:16 -0400 Subject: [PATCH] Add example from README to CI This should prevent breakages in the future. --- .github/workflows/main.yml | 3 +++ ci/run-curl-example.sh | 13 +++++++++++++ examples/curl/curl.sh | 5 +++++ 3 files changed, 21 insertions(+) create mode 100644 ci/run-curl-example.sh create mode 100755 examples/curl/curl.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfa8e89c523..af8d38c81d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -144,6 +144,9 @@ jobs: - lang: cpp docker-image: alpine:3.15.4 entrypoint: /bin/sh + - lang: curl + docker-image: alpine + entrypoint: /bin/sh name: test-${{ matrix.lang }}-example runs-on: ubuntu-latest diff --git a/ci/run-curl-example.sh b/ci/run-curl-example.sh new file mode 100644 index 00000000000..db243cf67f6 --- /dev/null +++ b/ci/run-curl-example.sh @@ -0,0 +1,13 @@ +# Copyright 2023 Francisco Souza. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +set -e + +./fake-gcs-server -backend memory -port 4443 -data ${PWD}/examples/data & + +apk add --update curl +( + cd examples/curl + ./curl.sh +) diff --git a/examples/curl/curl.sh b/examples/curl/curl.sh new file mode 100755 index 00000000000..f56002eb72e --- /dev/null +++ b/examples/curl/curl.sh @@ -0,0 +1,5 @@ +#!/bin/sh -e + +# This script matches the example in the README. + +curl --fail --insecure https://0.0.0.0:4443/storage/v1/b