Skip to content

Wrap some things in a create_app function and add a basic setup for t… #81

Wrap some things in a create_app function and add a basic setup for t…

Wrap some things in a create_app function and add a basic setup for t… #81

Workflow file for this run

name: Simple test so I can sleep better
on:
push:
workflow_dispatch:
jobs:
check_them_endpoints:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install env
run: |
sudo apt install nodejs npm && npm i -g html-validate
pip install -r requirements.txt
- name: Test the endpoints
run: |
./cmd.sh run &
sleep 2
curl -v "http://localhost:32168/comments?for=example" > out.html
cat out.html
html-validate out.html
curl -v "http://localhost:32168/comments?for=example/deeper" > out.html
cat out.html
html-validate out.html
curl -v "http://localhost:32168/comments?for=/example/deeper" > out.html
cat out.html
html-validate out.html
# Create new comment.
echo "::group::Creating comments..."
curl -v -X POST "http://localhost:32168/comments?for=/example/deeper" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "for=deeper&comment_author=michal&comment_contact=jejku@wp.pl&comment='ble ble ble'"
curl -v -X POST "http://localhost:32168/comments?for=/example/deeper" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "for=deeper&comment_author=bobek&comment_contact=noraczej@wp.pl&comment='nie nie nie'"
cat comments/example/deeper/*
echo "::endgroup::"