[Refactor] Fix Saga and StramHandler typing #29
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: CodSpeed | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "master" | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| benchmarks: | |
| name: Run benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Start infrastructure | |
| run: | | |
| docker compose -f docker-compose-test.yml up -d | |
| - name: Wait for MySQL | |
| run: | | |
| for i in $(seq 1 30); do | |
| if docker compose -f docker-compose-test.yml exec -T mysql_tests mysqladmin ping -h localhost -ucqrs -pcqrs --silent 2>/dev/null; then | |
| echo "MySQL is ready" | |
| exit 0 | |
| fi | |
| echo "Waiting for MySQL... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "MySQL did not become ready in time" | |
| exit 1 | |
| - name: Wait for Redis | |
| run: | | |
| for i in $(seq 1 15); do | |
| if docker compose -f docker-compose-test.yml exec -T redis_tests redis-cli ping 2>/dev/null | grep -q PONG; then | |
| echo "Redis is ready" | |
| exit 0 | |
| fi | |
| echo "Waiting for Redis... ($i/15)" | |
| sleep 1 | |
| done | |
| echo "Redis did not become ready in time" | |
| exit 1 | |
| - name: Run benchmarks | |
| uses: CodSpeedHQ/action@v4 | |
| with: | |
| mode: simulation | |
| run: pytest -c ./tests/pytest-config.ini tests/benchmarks/ --codspeed | |
| - name: Stop infrastructure | |
| if: always() | |
| run: docker compose -f docker-compose-test.yml down -v |