Skip to content

Create postman.yml

Create postman.yml #1

Workflow file for this run

name: Automated API tests using Postman CLI
on: push
jobs:
automated-api-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Postman CLI
run: |
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh
- name: Login to Postman CLI
run: postman login --with-api-key ${{ secrets.POSTMAN_API_KEY }}
- name: Run API tests
run: |
postman collection run "${{ github.workspace }}/postman/collections/petstore.json" --integration-id "166586-${{ github.run_id }}"
# Lint your API using Postman CLI
postman api lint 5605da7e-c743-4a8f-974d-8199ef1a61da --integration-id 166586