|
31 | 31 | strategy:
|
32 | 32 | fail-fast: false
|
33 | 33 | matrix:
|
34 |
| - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] |
| 34 | + python-version: ["3.7","3.8","3.9","3.10"] |
35 | 35 | # python3.6 reached EOL and is no longer being supported on
|
36 | 36 | # new versions of hosted runners on Github Actions
|
37 | 37 | # ubuntu-20.04 is the last version that supported python3.6
|
|
81 | 81 | coverage erase
|
82 | 82 |
|
83 | 83 | # Run tests
|
84 |
| - ./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && |
| 84 | + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-asyncpg" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && |
85 | 85 | coverage combine .coverage* &&
|
86 | 86 | coverage xml -i
|
87 | 87 |
|
|
91 | 91 | files: coverage.xml
|
92 | 92 |
|
93 | 93 |
|
| 94 | + test-latest: |
| 95 | + name: asyncpg latest, python ${{ matrix.python-version }}, ${{ matrix.os }} |
| 96 | + runs-on: ${{ matrix.os }} |
| 97 | + timeout-minutes: 30 |
| 98 | + |
| 99 | + strategy: |
| 100 | + fail-fast: false |
| 101 | + matrix: |
| 102 | + python-version: ["3.8","3.9","3.10","3.11","3.12"] |
| 103 | + # python3.6 reached EOL and is no longer being supported on |
| 104 | + # new versions of hosted runners on Github Actions |
| 105 | + # ubuntu-20.04 is the last version that supported python3.6 |
| 106 | + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 |
| 107 | + os: [ubuntu-20.04] |
| 108 | + services: |
| 109 | + postgres: |
| 110 | + image: postgres |
| 111 | + env: |
| 112 | + POSTGRES_PASSWORD: sentry |
| 113 | + # Set health checks to wait until postgres has started |
| 114 | + options: >- |
| 115 | + --health-cmd pg_isready |
| 116 | + --health-interval 10s |
| 117 | + --health-timeout 5s |
| 118 | + --health-retries 5 |
| 119 | + # Maps tcp port 5432 on service container to the host |
| 120 | + ports: |
| 121 | + - 5432:5432 |
| 122 | + env: |
| 123 | + SENTRY_PYTHON_TEST_POSTGRES_USER: postgres |
| 124 | + SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry |
| 125 | + SENTRY_PYTHON_TEST_POSTGRES_NAME: ci_test |
| 126 | + SENTRY_PYTHON_TEST_POSTGRES_HOST: localhost |
| 127 | + |
| 128 | + steps: |
| 129 | + - uses: actions/checkout@v4 |
| 130 | + - uses: actions/setup-python@v4 |
| 131 | + with: |
| 132 | + python-version: ${{ matrix.python-version }} |
| 133 | + |
| 134 | + - name: Setup Test Env |
| 135 | + run: | |
| 136 | + pip install coverage "tox>=3,<4" |
| 137 | + psql postgresql://postgres:sentry@localhost:5432 -c "create database ${SENTRY_PYTHON_TEST_POSTGRES_NAME};" || true |
| 138 | + psql postgresql://postgres:sentry@localhost:5432 -c "grant all privileges on database ${SENTRY_PYTHON_TEST_POSTGRES_NAME} to ${SENTRY_PYTHON_TEST_POSTGRES_USER};" || true |
| 139 | +
|
| 140 | + - name: Test asyncpg |
| 141 | + uses: nick-fields/retry@v2 |
| 142 | + with: |
| 143 | + timeout_minutes: 15 |
| 144 | + max_attempts: 2 |
| 145 | + retry_wait_seconds: 5 |
| 146 | + shell: bash |
| 147 | + command: | |
| 148 | + set -x # print commands that are executed |
| 149 | + coverage erase |
| 150 | +
|
| 151 | + # Run tests |
| 152 | + ./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && |
| 153 | + coverage combine .coverage* && |
| 154 | + coverage xml -i |
| 155 | +
|
| 156 | + - uses: codecov/codecov-action@v3 |
| 157 | + with: |
| 158 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 159 | + files: coverage.xml |
| 160 | + |
94 | 161 | check_required_tests:
|
95 | 162 | name: All asyncpg tests passed or skipped
|
96 | 163 | needs: test
|
|
0 commit comments