docs: Update README.md #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push] | |
jobs: | |
example: | |
runs-on: ubuntu-20.04 | |
name: Test | |
steps: | |
# Gets a copy of the source code in your repository before running API tests | |
- uses: actions/[email protected] | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
# Installs project's dependencies | |
- run: pip install -r apps/python/requirements.txt | |
# Start the API in the background | |
- run: python apps/python/app.py & | |
# Set sample access token | |
- name: Set access token | |
run: cat apps/python/secret.json | python3 -c "import sys, json; print(f'ACCESS_TOKEN={json.load(sys.stdin)[\"access_token\"]}')" >> $GITHUB_ENV | |
- name: Default test | |
uses: ./ | |
with: | |
schema: 'http://127.0.0.1:5001/openapi.json' | |
token: ${{ secrets.SCHEMATHESIS_TOKEN }} | |
args: '-E success -H "Authorization: Bearer ${{ env.ACCESS_TOKEN }}"' | |
- name: Custom hooks | |
uses: ./ | |
with: | |
schema: 'http://127.0.0.1:5001/openapi.json' | |
token: ${{ secrets.SCHEMATHESIS_TOKEN }} | |
version: '3.18.5' | |
hooks: 'apps.python.hooks' | |
args: '-c custom_check -E success -H "Authorization: Bearer ${{ env.ACCESS_TOKEN }}"' |