Skip to content

Commit 6754cf2

Browse files
authored
Split out gevent tests (#3962)
1 parent 2a61128 commit 6754cf2

File tree

3 files changed

+84
-9
lines changed

3 files changed

+84
-9
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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.8","3.10","3.11","3.12"]
33+
os: [ubuntu-22.04]
34+
steps:
35+
- uses: actions/[email protected]
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
40+
- name: Setup Test Env
41+
run: |
42+
pip install "coverage[toml]" tox
43+
- name: Erase coverage
44+
run: |
45+
coverage erase
46+
- name: Test gevent pinned
47+
run: |
48+
set -x # print commands that are executed
49+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gevent"
50+
- name: Generate coverage XML
51+
if: ${{ !cancelled() }}
52+
run: |
53+
coverage combine .coverage-sentry-*
54+
coverage xml
55+
- name: Upload coverage to Codecov
56+
if: ${{ !cancelled() }}
57+
uses: codecov/[email protected]
58+
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
files: coverage.xml
61+
# make sure no plugins alter our coverage reports
62+
plugin: noop
63+
verbose: true
64+
- name: Upload test results to Codecov
65+
if: ${{ !cancelled() }}
66+
uses: codecov/test-results-action@v1
67+
with:
68+
token: ${{ secrets.CODECOV_TOKEN }}
69+
files: .junitxml
70+
verbose: true
71+
check_required_tests:
72+
name: All pinned Gevent tests passed
73+
needs: test-gevent-pinned
74+
# Always run this, even if a dependent job failed
75+
if: always()
76+
runs-on: ubuntu-20.04
77+
steps:
78+
- name: Check for failures
79+
if: contains(needs.test-gevent-pinned.result, 'failure') || contains(needs.test-gevent-pinned.result, 'skipped')
80+
run: |
81+
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

.github/workflows/test-integrations-network.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ jobs:
4343
- name: Erase coverage
4444
run: |
4545
coverage erase
46-
- name: Test gevent latest
47-
run: |
48-
set -x # print commands that are executed
49-
./scripts/runtox.sh "py${{ matrix.python-version }}-gevent-latest"
5046
- name: Test grpc latest
5147
run: |
5248
set -x # print commands that are executed
@@ -101,10 +97,6 @@ jobs:
10197
- name: Erase coverage
10298
run: |
10399
coverage erase
104-
- name: Test gevent pinned
105-
run: |
106-
set -x # print commands that are executed
107-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gevent"
108100
- name: Test grpc pinned
109101
run: |
110102
set -x # print commands that are executed

scripts/split_tox_gh_actions/split_tox_gh_actions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
"Common": [
5959
"common",
6060
],
61+
"Gevent": [
62+
"gevent",
63+
],
6164
"AI": [
6265
"anthropic",
6366
"cohere",
@@ -96,7 +99,6 @@
9699
"strawberry",
97100
],
98101
"Network": [
99-
"gevent",
100102
"grpc",
101103
"httpx",
102104
"requests",

0 commit comments

Comments
 (0)