Skip to content

test

test #47

Workflow file for this run

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