Generalize ASGI Middleware used in Quart to a function #1910
This file contains hidden or 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: 🧪 Unit Tests | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| timeout-minutes: 15 | |
| strategy: | |
| # Don't cancel jobs if one fails | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Start databases | |
| working-directory: ./sample-apps/databases | |
| run: docker compose up --build -d | |
| - name: Add local.aikido.io to /etc/hosts | |
| run: | | |
| sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts | |
| - name: Build and start aikido mock server | |
| run: | | |
| cd end2end/server && docker build -t mock_core . | |
| docker run --name mock_core -d -p 5050:5000 mock_core | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Setup safe-chain | |
| run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| make install | |
| - name: Run tests with coverage | |
| run: | | |
| make cov | |
| - name: Upload coverage report to Codecov | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| with: | |
| fail_ci_if_error: true | |
| files: ./coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true |