Workflow file for this run
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
name: 'Fastapi Performance tuning measurements' | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
simple_measurements: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 300 | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
python-version: [ '3.10' ] | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
- uses: satackey/[email protected] | |
continue-on-error: true | |
- name: 'Docker Compose' | |
uses: isbang/[email protected] | |
with: | |
compose-file: "./docker-compose.yml" | |
up-flags: "--build --force-recreate" | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f test_files/requirements.txt ]; then pip install -r test_files/requirements.txt; fi | |
mkdir -p reports | |
docker-compose ps --all | |
- name: 'Measure middlewares' | |
run: ./bin/run_test.sh middlewares | |
# - name: 'Measure sync vs async endpoints' | |
# run: ./bin/run_test.sh sync_async | |
# - name: 'Measure json response classes' | |
# run: ./bin/run_test.sh json_classes | |
- name: 'Measure Nginx port vs socket' | |
run: ./bin/run_test.sh nginx_port_vs_socket | |
- name: 'Measure Gunicorn vs Uvicorn' | |
run: ./bin/run_test.sh gunicorn_vs_uvicorn | |
- name: 'Nginx socker vs socket + keepalive' | |
run: ./bin/run_test.sh nginx_socker_keepalive | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Pytest-Report-${{ matrix.python-version }} | |
path: ./reports | |
workers_and_threads: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 300 | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] # , macos-latest, windows-latest | |
python-version: [ '3.10' ] # '3.6', '3.7', '3.8', '3.9', | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
- uses: satackey/[email protected] | |
continue-on-error: true | |
- name: 'Docker Compose' | |
uses: isbang/[email protected] | |
with: | |
compose-file: "./docker-compose_workers_and_threads.yml" | |
up-flags: "--build --force-recreate" | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f test_files/requirements.txt ]; then pip install -r test_files/requirements.txt; fi | |
mkdir -p reports test_files/svg | |
docker-compose ps --all | |
- name: 'Measure workers and threads' | |
run: ./bin/run_test.sh workers_and_threads | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Pytest-Report-${{ matrix.python-version }} | |
path: ./reports | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: SVG-${{ matrix.python-version }} | |
path: test_files/svg | |
- name: Lint Code Base | |
uses: super-linter/super-linter/slim@v5 | |
env: | |
VALIDATE_ALL_CODEBASE: false | |
DEFAULT_BRANCH: master | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |