fix: wait for restroom to be up before ending #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: restroom-ci | |
on: [push] | |
jobs: | |
restroom_job: | |
runs-on: ubuntu-latest | |
name: 🚀 Start restroom and request some contracts | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v3 | |
- name: 🚀 Start restroom | |
uses: ./ | |
with: | |
restroom-contracts: "${{ github.workspace }}/contracts" | |
restroom-files: "${{ github.workspace }}/" | |
restroom-logger: "${{ github.workspace }}/" | |
- name: ⚙️ Execute a contract | |
run: | | |
curl -s -w "%{stderr}%{http_code}" http://localhost:3000/api/test 2>/tmp/status | |
if [[ `cat /tmp/status` != "200" ]]; then | |
echo -ne "\nerror: " | |
cat /tmp/status | |
exit 1 | |
fi | |
- name: ⚙️ Execute a contract with files | |
run: | | |
curl -s -w "%{stderr}%{http_code}" http://localhost:3000/api/file_test 2>/tmp/status | |
if [[ `cat /tmp/status` != "200" ]]; then | |
echo -ne "\nerror: " | |
cat /tmp/status | |
exit 1 | |
fi | |
- name: ⚙️ Execute a contract with logger | |
run: | | |
rm -f my.log | |
curl -s -w "%{stderr}%{http_code}" http://localhost:3000/api/logger_test 2>/tmp/status | |
if [[ `cat /tmp/status` != "200" ]]; then | |
printf "\nerror: " | |
cat /tmp/status | |
exit 1 | |
fi | |
sleep 1 | |
res=`cat my.log` | |
if [[ "$res" != "HELLOWORLD!" ]]; then | |
echo "Wrong content of log" | |
echo "$res" | |
exit 1 | |
fi |