mirror of
https://github.com/fjogeleit/http-request-action.git
synced 2024-12-23 04:37:28 +00:00
0929a0c636
* Implement StatusCode ignore list
64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
name: Test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
request:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
|
|
- name: Request Postment Echo GET
|
|
uses: ./
|
|
with:
|
|
url: 'https://postman-echo.com/get'
|
|
method: 'GET'
|
|
|
|
- name: Request Postment Echo POST
|
|
uses: ./
|
|
with:
|
|
url: 'https://postman-echo.com/post'
|
|
method: 'POST'
|
|
data: '{ "key": "value" }'
|
|
|
|
- name: Request Postment Echo POST with Unescaped Newline
|
|
uses: ./
|
|
with:
|
|
url: 'https://postman-echo.com/post'
|
|
method: 'POST'
|
|
escapeData: 'true'
|
|
data: >-
|
|
{
|
|
"key":"multi line\ntest
|
|
text"
|
|
}
|
|
|
|
- name: Request Postment Echo BasicAuth
|
|
uses: ./
|
|
with:
|
|
url: 'https://postman-echo.com/basic-auth'
|
|
method: 'GET'
|
|
username: 'postman'
|
|
password: 'password'
|
|
|
|
- name: Request Postment Echo with 404 Response and ignore failure code
|
|
uses: ./
|
|
with:
|
|
url: 'https://postman-echo.com/status/404'
|
|
method: 'GET'
|
|
ignoreStatusCodes: '404'
|
|
|
|
- name: Create Test File
|
|
id: image
|
|
run: |
|
|
echo "test" > testfile.txt
|
|
|
|
- name: Request Postment Echo POST Multipart
|
|
uses: ./
|
|
with:
|
|
url: 'https://postman-echo.com/post'
|
|
method: 'POST'
|
|
data: '{ "key": "value" }'
|
|
files: '{ "file": "${{ github.workspace }}/testfile.txt" }'
|