Skip to content

Commit

Permalink
Add example from README to CI
Browse files Browse the repository at this point in the history
This should prevent breakages in the future.
  • Loading branch information
fsouza committed May 10, 2023
1 parent 052428c commit af02b5c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions ci/run-curl-example.sh
Original file line number Diff line number Diff line change
@@ -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
)
5 changes: 5 additions & 0 deletions examples/curl/curl.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit af02b5c

Please sign in to comment.