Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 2.1

workflows:
main:
jobs:
- deploy-on-staging:
filters:
branches:
only:
- website-tutorial-ci
- scanapi:
requires:
- deploy-on-staging
filters:
branches:
only:
- website-tutorial-ci

jobs:
deploy-on-staging:
docker:
- image: cimg/node:14.10.1
steps:
- run: echo "Your staging deploy job here!"
scanapi:
docker:
- image: camilamaia/scanapi:2.4.0
environment:
USER: $USER
PASSWORD: $PASSWORD
steps:
- checkout
- run:
name: Run ScanAPI
command: |
scanapi run scanapi/scanapi.yaml -c scanapi/scanapi.conf -o scanapi/report.html
- store_artifacts:
path: scanapi/report.html
28 changes: 28 additions & 0 deletions .github/workflows/scanapi-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Document and Test
on:
pull_request

jobs:
deploy-on-staging:
runs-on: ubuntu-latest
steps:
- run: echo "Your staging deploy action here!"
scanapi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run automated API tests
uses: scanapi/github-action@v1
env:
USER: ${{ secrets.USER }}
PASSWORD: ${{ secrets.PASSWORD }}
with:
scanapi_version: '==2.4.0'
arguments: run ./scanapi/scanapi.yaml -c ./scanapi/scanapi.conf -o ./scanapi/scanapi-report.html
- name: Upload scanapi-report.html
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: ScanAPI Report
path: ./scanapi/scanapi-report.html
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.
2 changes: 1 addition & 1 deletion demo-api/scanapi.yaml → scanapi/scanapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
endpoints:
- name: snippets-api
path: ${BASE_URL}
path: http://demo.scanapi.dev/api/v1/
headers:
Content-Type: application/json
requests:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.