Skip to content

Commit 77bf59d

Browse files
committed
Testing github action for website tutorial
1 parent a4dc84e commit 77bf59d

25 files changed

+29
-1
lines changed

.github/workflows/scanapi-action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Document and Test
2+
on:
3+
pull_request
4+
5+
jobs:
6+
deploy-on-staging:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- run: echo "Your staging deploy action here!"
10+
scanapi:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Run automated API tests
15+
uses: scanapi/github-action@v1
16+
env:
17+
USER: ${{ secrets.USER }}
18+
PASSWORD: ${{ secrets.PASSWORD }}
19+
with:
20+
scanapi_version: '==2.4.0'
21+
arguments: run ./scanapi/scanapi.yaml -c ./scanapi/scanapi.conf -o ./scanapi/scanapi-report.html
22+
- name: Upload scanapi-report.html
23+
uses: actions/upload-artifact@v2
24+
if: ${{ always() }}
25+
with:
26+
name: ScanAPI Report
27+
path: ./scanapi/scanapi-report.html
28+
needs: [deploy-on-staging]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

demo-api/scanapi.yaml renamed to scanapi/scanapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
endpoints:
22
- name: snippets-api
3-
path: ${BASE_URL}
3+
path: http://demo.scanapi.dev/api/v1/
44
headers:
55
Content-Type: application/json
66
requests:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)