|
| 1 | +# Do not edit this YAML file. This file is generated automatically by executing |
| 2 | +# python scripts/split_tox_gh_actions/split_tox_gh_actions.py |
| 3 | +# The template responsible for it is in |
| 4 | +# scripts/split_tox_gh_actions/templates/base.jinja |
| 5 | +name: Test Gevent |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - master |
| 10 | + - release/** |
| 11 | + - potel-base |
| 12 | + pull_request: |
| 13 | +# Cancel in progress workflows on pull_requests. |
| 14 | +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 17 | + cancel-in-progress: true |
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | +env: |
| 21 | + BUILD_CACHE_KEY: ${{ github.sha }} |
| 22 | + CACHED_BUILD_PATHS: | |
| 23 | + ${{ github.workspace }}/dist-serverless |
| 24 | +jobs: |
| 25 | + test-gevent-pinned: |
| 26 | + name: Gevent (pinned) |
| 27 | + timeout-minutes: 30 |
| 28 | + runs-on: ${{ matrix.os }} |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + python-version: ["3.6","3.8","3.10","3.11","3.12"] |
| 33 | + # python3.6 reached EOL and is no longer being supported on |
| 34 | + # new versions of hosted runners on Github Actions |
| 35 | + # ubuntu-20.04 is the last version that supported python3.6 |
| 36 | + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 |
| 37 | + os: [ubuntu-20.04] |
| 38 | + steps: |
| 39 | + |
| 40 | + - uses: actions/setup-python@v5 |
| 41 | + with: |
| 42 | + python-version: ${{ matrix.python-version }} |
| 43 | + allow-prereleases: true |
| 44 | + - name: Setup Test Env |
| 45 | + run: | |
| 46 | + pip install "coverage[toml]" tox |
| 47 | + - name: Erase coverage |
| 48 | + run: | |
| 49 | + coverage erase |
| 50 | + - name: Test gevent pinned |
| 51 | + run: | |
| 52 | + set -x # print commands that are executed |
| 53 | + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gevent" |
| 54 | + - name: Generate coverage XML (Python 3.6) |
| 55 | + if: ${{ !cancelled() && matrix.python-version == '3.6' }} |
| 56 | + run: | |
| 57 | + export COVERAGE_RCFILE=.coveragerc36 |
| 58 | + coverage combine .coverage-sentry-* |
| 59 | + coverage xml --ignore-errors |
| 60 | + - name: Generate coverage XML |
| 61 | + if: ${{ !cancelled() && matrix.python-version != '3.6' }} |
| 62 | + run: | |
| 63 | + coverage combine .coverage-sentry-* |
| 64 | + coverage xml |
| 65 | + - name: Upload coverage to Codecov |
| 66 | + if: ${{ !cancelled() }} |
| 67 | + |
| 68 | + with: |
| 69 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 70 | + files: coverage.xml |
| 71 | + # make sure no plugins alter our coverage reports |
| 72 | + plugin: noop |
| 73 | + verbose: true |
| 74 | + - name: Upload test results to Codecov |
| 75 | + if: ${{ !cancelled() }} |
| 76 | + uses: codecov/test-results-action@v1 |
| 77 | + with: |
| 78 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 79 | + files: .junitxml |
| 80 | + verbose: true |
| 81 | + check_required_tests: |
| 82 | + name: All pinned Gevent tests passed |
| 83 | + needs: test-gevent-pinned |
| 84 | + # Always run this, even if a dependent job failed |
| 85 | + if: always() |
| 86 | + runs-on: ubuntu-20.04 |
| 87 | + steps: |
| 88 | + - name: Check for failures |
| 89 | + if: contains(needs.test-gevent-pinned.result, 'failure') || contains(needs.test-gevent-pinned.result, 'skipped') |
| 90 | + run: | |
| 91 | + echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 |
0 commit comments