Skip to content

Commit

Permalink
update test scripts to exit on cmd error (i.e. set -e) and add initia…
Browse files Browse the repository at this point in the history
…l grouping of cmds to gleaner verification gh action
  • Loading branch information
adplincinst committed May 29, 2024
1 parent 11243f4 commit 2032e63
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test_geoconnex_dev_sitemap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- run: sudo apt-get install make
- run: sudo apt-get install git
- run: mkdir -p $HOME/bin
- run: curl https://dl.min.io/client/mc/release/linux-amd64/mc -o $HOME/bin/mc && chmod +x $HOME/bin/mc
- run: sh scripts/iow/start-headless-chrome.sh
- run: sh scripts/iow/start-minio.sh && sleep 3
- run: $HOME/bin/mc alias set myminio http://localhost:9000 amazingaccesskey amazingsecretkey
- run: $HOME/bin/mc mb myminio/iow
- name: Install and Run Gleaner Runtime Dependencies, Test Utils, and Setup Env.
run: |
mkdir -p $HOME/bin
curl https://dl.min.io/client/mc/release/linux-amd64/mc -o $HOME/bin/mc && chmod +x $HOME/bin/mc
sh scripts/iow/start-headless-chrome.sh
sh scripts/iow/start-minio.sh && sleep 3
$HOME/bin/mc alias set myminio http://localhost:9000 amazingaccesskey amazingsecretkey
$HOME/bin/mc mb myminio/iow
- run: make
- run: sh scripts/iow/start-gleaner.sh
- run: sh scripts/iow/assert-s3-dir-cnt.sh $HOME/bin/mc myminio/iow/orgs 5
Expand Down
2 changes: 2 additions & 0 deletions scripts/iow/assert-s3-dir-cnt.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

set -e #exit on error

MC="$1"
DIR="$2"
DESIRED_COUNT="$3"
Expand Down
7 changes: 4 additions & 3 deletions scripts/iow/start-gleaner.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/bin/sh

# exit on error
set -e



# set relative path of gleaner config from root of this repository
CFGPATH="configs/iow/pids-geoconnex-dev-gleanerconfig.yaml"

for src in `cat $CFGPATH | grep '\Wname:'|awk '{print $2}'`
do


echo "harvesting source '$src'..."
./gleaner -log debug -cfg $CFGPATH -source $src -rude
./gleaner -log info -cfg $CFGPATH -source $src -rude
done
echo "complete!"

1 change: 1 addition & 0 deletions scripts/iow/start-headless-chrome.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

set -e # exit on error

docker run -d \
--rm \
Expand Down
5 changes: 5 additions & 0 deletions scripts/iow/start-minio.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/sh


set -e # exit on error

# --rm
# --memory


docker run -d \
--rm \
-p 9000:9000 \
Expand Down

0 comments on commit 2032e63

Please sign in to comment.