Skip to content

Commit 48d6368

Browse files
authored
Split gevent tests off (#3964)
Same as #3962, but for master
1 parent d2ccac0 commit 48d6368

File tree

3 files changed

+94
-9
lines changed

3 files changed

+94
-9
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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+
- uses: actions/[email protected]
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+
uses: codecov/[email protected]
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

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ jobs:
4747
- name: Erase coverage
4848
run: |
4949
coverage erase
50-
- name: Test gevent latest
51-
run: |
52-
set -x # print commands that are executed
53-
./scripts/runtox.sh "py${{ matrix.python-version }}-gevent-latest"
5450
- name: Test grpc latest
5551
run: |
5652
set -x # print commands that are executed
@@ -115,10 +111,6 @@ jobs:
115111
- name: Erase coverage
116112
run: |
117113
coverage erase
118-
- name: Test gevent pinned
119-
run: |
120-
set -x # print commands that are executed
121-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gevent"
122114
- name: Test grpc pinned
123115
run: |
124116
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
@@ -89,14 +89,16 @@
8989
"openfeature",
9090
"unleash",
9191
],
92+
"Gevent": [
93+
"gevent",
94+
],
9295
"GraphQL": [
9396
"ariadne",
9497
"gql",
9598
"graphene",
9699
"strawberry",
97100
],
98101
"Network": [
99-
"gevent",
100102
"grpc",
101103
"httpx",
102104
"requests",

0 commit comments

Comments
 (0)