Repository navigation
fix: Keep reporter thread alive when a collector raises (#133) #338
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: Run tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Poetry install | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.local | |
| # NB! Update key when Poetry version is updated | |
| key: python-${{ steps.setup-python.outputs.python-version }}-poetry-1.8.4 | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| # NB! Update Poetry cache key when updating Poetry version | |
| version: 1.8.4 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: .venv | |
| key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} | |
| - name: Load cached venv (sample apps) | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| sample-apps/django_sample/.venv | |
| sample-apps/flask_sample/.venv | |
| sample-apps/fastapi_sample/.venv | |
| key: venv-samples-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('sample-apps/**/poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --all-extras --no-interaction --no-root | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| - name: Install library | |
| run: poetry install --all-extras --no-interaction | |
| - name: Test with pytest | |
| run: poetry run pytest | |
| - name: Test django sample app | |
| run: cd ./sample-apps/django_sample && poetry install --all-extras --no-interaction && bin/test | |
| - name: Test flask sample app | |
| run: cd ./sample-apps/flask_sample && poetry install --all-extras --no-interaction && bin/test | |
| - name: Test fast API sample app | |
| run: cd ./sample-apps/fastapi_sample && poetry install --all-extras --no-interaction && bin/test |