1
0
Fork 0
mirror of https://github.com/fjogeleit/http-request-action.git synced 2024-12-23 12:46:14 +00:00
http-request-action/.github/workflows/test.yml

78 lines
2 KiB
YAML
Raw Normal View History

2020-04-21 11:44:56 +00:00
name: Test
on: [push, pull_request]
jobs:
request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
2021-07-22 12:52:06 +00:00
- name: Request Postman Echo GET
2020-04-21 11:44:56 +00:00
uses: ./
with:
2020-04-21 11:55:30 +00:00
url: 'https://postman-echo.com/get'
2020-04-21 11:44:56 +00:00
method: 'GET'
2020-04-21 11:58:56 +00:00
2021-07-22 12:52:06 +00:00
- name: Request Postman Echo POST
2020-04-21 11:58:56 +00:00
uses: ./
with:
url: 'https://postman-echo.com/post'
method: 'POST'
data: '{ "key": "value" }'
2020-04-21 12:07:56 +00:00
2021-07-22 12:52:06 +00:00
- name: Request Postman Echo POST with Unescaped Newline
uses: ./
with:
url: 'https://postman-echo.com/post'
method: 'POST'
escapeData: 'true'
data: >-
{
"key":"multi line\ntest
text"
}
2021-07-22 12:52:06 +00:00
- name: Request Postman Echo BasicAuth
2020-04-21 12:07:56 +00:00
uses: ./
with:
url: 'https://postman-echo.com/basic-auth'
2020-04-21 12:09:38 +00:00
method: 'GET'
2020-04-21 12:07:56 +00:00
username: 'postman'
password: 'password'
2021-07-22 12:52:06 +00:00
- name: Request Postman 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
run: |
echo "test" > testfile.txt
2021-07-22 12:52:06 +00:00
- name: Request Postman Echo POST Multipart
uses: ./
with:
url: 'https://postman-echo.com/post'
method: 'POST'
data: '{ "key": "value" }'
files: '{ "file": "${{ github.workspace }}/testfile.txt" }'
2022-02-10 03:14:07 +00:00
- name: Request Postman Echo POST Multipart without data
uses: ./
with:
url: 'https://postman-echo.com/post'
method: 'POST'
files: '{ "file": "${{ github.workspace }}/testfile.txt" }'
2022-02-10 03:14:07 +00:00
- name: Request Postman Echo POST single file
uses: ./
with:
url: 'https://postman-echo.com/post'
method: 'POST'
file: "${{ github.workspace }}/testfile.txt"