-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.42 KB
/
simple_test.yml
File metadata and controls
40 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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::"