Skip to content

Commit 7d7c8ea

Browse files
authored
tests: Move chalice under toxgen (#4766)
chalice was the last test suite in the Cloud group that was still hardcoded, so moving it under toxgen also gets rid of the whole `latest` group 🎉 Ref #4506
1 parent dee6de1 commit 7d7c8ea

File tree

6 files changed

+20
-101
lines changed

6 files changed

+20
-101
lines changed

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

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -22,85 +22,6 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-cloud-latest:
26-
name: Cloud (latest)
27-
timeout-minutes: 30
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
python-version: ["3.8","3.12","3.13"]
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-22.04]
38-
services:
39-
docker:
40-
image: docker:dind # Required for Docker network management
41-
options: --privileged # Required for Docker-in-Docker operations
42-
# Use Docker container only for Python 3.6
43-
container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }}
44-
steps:
45-
- uses: actions/[email protected]
46-
- uses: actions/setup-python@v5
47-
if: ${{ matrix.python-version != '3.6' }}
48-
with:
49-
python-version: ${{ matrix.python-version }}
50-
allow-prereleases: true
51-
- name: Setup Test Env
52-
run: |
53-
pip install "coverage[toml]" tox
54-
- name: Erase coverage
55-
run: |
56-
coverage erase
57-
- name: Test aws_lambda latest
58-
run: |
59-
set -x # print commands that are executed
60-
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda-latest"
61-
- name: Test boto3 latest
62-
run: |
63-
set -x # print commands that are executed
64-
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest"
65-
- name: Test chalice latest
66-
run: |
67-
set -x # print commands that are executed
68-
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest"
69-
- name: Test cloud_resource_context latest
70-
run: |
71-
set -x # print commands that are executed
72-
./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context-latest"
73-
- name: Test gcp latest
74-
run: |
75-
set -x # print commands that are executed
76-
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest"
77-
- name: Generate coverage XML (Python 3.6)
78-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
79-
run: |
80-
export COVERAGE_RCFILE=.coveragerc36
81-
coverage combine .coverage-sentry-*
82-
coverage xml --ignore-errors
83-
- name: Generate coverage XML
84-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
85-
run: |
86-
coverage combine .coverage-sentry-*
87-
coverage xml
88-
- name: Upload coverage to Codecov
89-
if: ${{ !cancelled() }}
90-
uses: codecov/[email protected]
91-
with:
92-
token: ${{ secrets.CODECOV_TOKEN }}
93-
files: coverage.xml
94-
# make sure no plugins alter our coverage reports
95-
plugins: noop
96-
verbose: true
97-
- name: Upload test results to Codecov
98-
if: ${{ !cancelled() }}
99-
uses: codecov/test-results-action@v1
100-
with:
101-
token: ${{ secrets.CODECOV_TOKEN }}
102-
files: .junitxml
103-
verbose: true
10425
test-cloud-pinned:
10526
name: Cloud (pinned)
10627
timeout-minutes: 30

scripts/populate_tox/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
"py3.7": ["importlib-metadata<5.0"],
6767
},
6868
},
69+
"chalice": {
70+
"package": "chalice",
71+
"deps": {
72+
"*": ["pytest-chalice"],
73+
},
74+
},
6975
"clickhouse_driver": {
7076
"package": "clickhouse-driver",
7177
},

scripts/populate_tox/populate_tox.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
"potel",
6868
# Integrations that can be migrated -- we should eventually remove all
6969
# of these from the IGNORE list
70-
"chalice",
7170
"gcp",
7271
"httpx",
7372
"pure_eval",

scripts/populate_tox/tox.jinja

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ envlist =
4242
# AWS Lambda
4343
{py3.8,py3.9,py3.11,py3.13}-aws_lambda
4444

45-
# Chalice
46-
{py3.6,py3.9}-chalice-v{1.16}
47-
{py3.8,py3.12,py3.13}-chalice-latest
48-
4945
# Cloud Resource Context
5046
{py3.6,py3.12,py3.13}-cloud_resource_context
5147

@@ -158,11 +154,6 @@ deps =
158154
aws_lambda: requests
159155
aws_lambda: uvicorn
160156
161-
# Chalice
162-
chalice: pytest-chalice==0.0.5
163-
chalice-v1.16: chalice~=1.16.0
164-
chalice-latest: chalice
165-
166157
# HTTPX
167158
httpx-v0.16: pytest-httpx==0.10.0
168159
httpx-v0.18: pytest-httpx==0.12.0

tests/integrations/chalice/test_chalice.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def every_hour(event):
110110

111111

112112
@pytest.mark.skipif(
113-
parse_version(CHALICE_VERSION) >= (1, 28),
113+
parse_version(CHALICE_VERSION) >= (1, 26, 0),
114114
reason="different behavior based on chalice version",
115115
)
116116
def test_bad_request_old(client: RequestHandler) -> None:
@@ -124,7 +124,7 @@ def test_bad_request_old(client: RequestHandler) -> None:
124124

125125

126126
@pytest.mark.skipif(
127-
parse_version(CHALICE_VERSION) < (1, 28),
127+
parse_version(CHALICE_VERSION) < (1, 26, 0),
128128
reason="different behavior based on chalice version",
129129
)
130130
def test_bad_request(client: RequestHandler) -> None:

tox.ini

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# The file (and all resulting CI YAMLs) then need to be regenerated via
1111
# "scripts/generate-test-files.sh".
1212
#
13-
# Last generated: 2025-09-05T07:14:50.663886+00:00
13+
# Last generated: 2025-09-05T07:52:27.350774+00:00
1414

1515
[tox]
1616
requires =
@@ -42,10 +42,6 @@ envlist =
4242
# AWS Lambda
4343
{py3.8,py3.9,py3.11,py3.13}-aws_lambda
4444

45-
# Chalice
46-
{py3.6,py3.9}-chalice-v{1.16}
47-
{py3.8,py3.12,py3.13}-chalice-latest
48-
4945
# Cloud Resource Context
5046
{py3.6,py3.12,py3.13}-cloud_resource_context
5147

@@ -152,6 +148,11 @@ envlist =
152148
{py3.7,py3.11,py3.12}-boto3-v1.28.85
153149
{py3.9,py3.12,py3.13}-boto3-v1.40.24
154150

151+
{py3.6,py3.7,py3.8}-chalice-v1.16.0
152+
{py3.6,py3.7,py3.8}-chalice-v1.21.9
153+
{py3.6,py3.8,py3.9}-chalice-v1.26.6
154+
{py3.9,py3.12,py3.13}-chalice-v1.32.0
155+
155156

156157
# ~~~ DBs ~~~
157158
{py3.7,py3.8,py3.9}-asyncpg-v0.23.0
@@ -372,11 +373,6 @@ deps =
372373
aws_lambda: requests
373374
aws_lambda: uvicorn
374375

375-
# Chalice
376-
chalice: pytest-chalice==0.0.5
377-
chalice-v1.16: chalice~=1.16.0
378-
chalice-latest: chalice
379-
380376
# HTTPX
381377
httpx-v0.16: pytest-httpx==0.10.0
382378
httpx-v0.18: pytest-httpx==0.12.0
@@ -541,6 +537,12 @@ deps =
541537
boto3-v1.40.24: boto3==1.40.24
542538
{py3.7,py3.8}-boto3: urllib3<2.0.0
543539

540+
chalice-v1.16.0: chalice==1.16.0
541+
chalice-v1.21.9: chalice==1.21.9
542+
chalice-v1.26.6: chalice==1.26.6
543+
chalice-v1.32.0: chalice==1.32.0
544+
chalice: pytest-chalice
545+
544546

545547
# ~~~ DBs ~~~
546548
asyncpg-v0.23.0: asyncpg==0.23.0

0 commit comments

Comments
 (0)