-
Notifications
You must be signed in to change notification settings - Fork 550
Use a script to populate parts of tox.ini #3920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f54a018
9c829da
c365900
cb7a0aa
51de6a2
33e66b2
153bae2
d4d44b1
fbe73b8
6c2edd0
7470a9b
16a4ba2
ec3d9cb
04a2ab6
b44f195
a1e7da7
8345859
971d4ab
fe62214
15fa2d2
e0e6b20
e14f2c4
b8d29b3
c6f1c65
97a7ae7
875fa6e
7ed6109
5c05100
267dc07
5cff258
e392825
30effcf
912c981
7d45cc6
6d0ab22
f60018e
c4dab11
1068830
67502e7
91ea137
fcfb731
37d0e25
a96e1a4
ef0af89
b37519b
659d859
f23c8be
e330704
26638a5
bb4c84e
beb2271
dca044e
9f2ce18
9c45ece
dd2a531
6927592
1ae16bf
6176ea5
b17e51d
6ef2e19
82b8a60
0adedc7
b0a0772
d7721ad
057a1dc
5b9da4b
10f96a7
26fcd99
ce869ec
d9eead4
e54e888
8b11b74
feca999
975862c
5524412
d6b4257
386d4ef
0bf2a2b
64ced2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7","3.9","3.11","3.12","3.13"] | ||
python-version: ["3.7","3.9","3.11","3.12"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we removing 3.13 here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #3920 (comment) (also for the other CI YAML changes) |
||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
@@ -101,7 +101,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8","3.9","3.11","3.12","3.13"] | ||
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,70 +22,6 @@ env: | |
CACHED_BUILD_PATHS: | | ||
${{ github.workspace }}/dist-serverless | ||
jobs: | ||
test-flags-latest: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please explain why we need to delete these lines (and the lines in the other files)? It is unclear to me from the PR description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explanation here: #3974 (comment) Basically, the script doesn't generate a |
||
name: Flags (latest) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: Setup Test Env | ||
run: | | ||
pip install "coverage[toml]" tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test launchdarkly latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly-latest" | ||
- name: Test openfeature latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature-latest" | ||
- name: Test unleash latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-unleash-latest" | ||
- name: Generate coverage XML (Python 3.6) | ||
if: ${{ !cancelled() && matrix.python-version == '3.6' }} | ||
run: | | ||
export COVERAGE_RCFILE=.coveragerc36 | ||
coverage combine .coverage-sentry-* | ||
coverage xml --ignore-errors | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() && matrix.python-version != '3.6' }} | ||
run: | | ||
coverage combine .coverage-sentry-* | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
# make sure no plugins alter our coverage reports | ||
plugin: noop | ||
verbose: true | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: .junitxml | ||
verbose: true | ||
test-flags-pinned: | ||
name: Flags (pinned) | ||
timeout-minutes: 30 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,82 +22,14 @@ env: | |
CACHED_BUILD_PATHS: | | ||
${{ github.workspace }}/dist-serverless | ||
jobs: | ||
test-graphql-latest: | ||
name: GraphQL (latest) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7","3.8","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: Setup Test Env | ||
run: | | ||
pip install "coverage[toml]" tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test ariadne latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne-latest" | ||
- name: Test gql latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-gql-latest" | ||
- name: Test graphene latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-graphene-latest" | ||
- name: Test strawberry latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry-latest" | ||
- name: Generate coverage XML (Python 3.6) | ||
if: ${{ !cancelled() && matrix.python-version == '3.6' }} | ||
run: | | ||
export COVERAGE_RCFILE=.coveragerc36 | ||
coverage combine .coverage-sentry-* | ||
coverage xml --ignore-errors | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() && matrix.python-version != '3.6' }} | ||
run: | | ||
coverage combine .coverage-sentry-* | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
# make sure no plugins alter our coverage reports | ||
plugin: noop | ||
verbose: true | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: .junitxml | ||
verbose: true | ||
test-graphql-pinned: | ||
name: GraphQL (pinned) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7","3.8","3.11","3.12"] | ||
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,82 +22,6 @@ env: | |
CACHED_BUILD_PATHS: | | ||
${{ github.workspace }}/dist-serverless | ||
jobs: | ||
test-misc-latest: | ||
name: Misc (latest) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.6","3.7","3.8","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: Setup Test Env | ||
run: | | ||
pip install "coverage[toml]" tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test loguru latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-loguru-latest" | ||
- name: Test opentelemetry latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry-latest" | ||
- name: Test potel latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-potel-latest" | ||
- name: Test pure_eval latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval-latest" | ||
- name: Test trytond latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-trytond-latest" | ||
- name: Test typer latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-typer-latest" | ||
- name: Generate coverage XML (Python 3.6) | ||
if: ${{ !cancelled() && matrix.python-version == '3.6' }} | ||
run: | | ||
export COVERAGE_RCFILE=.coveragerc36 | ||
coverage combine .coverage-sentry-* | ||
coverage xml --ignore-errors | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() && matrix.python-version != '3.6' }} | ||
run: | | ||
coverage combine .coverage-sentry-* | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
# make sure no plugins alter our coverage reports | ||
plugin: noop | ||
verbose: true | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: .junitxml | ||
verbose: true | ||
test-misc-pinned: | ||
name: Misc (pinned) | ||
timeout-minutes: 30 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8","3.9","3.11","3.12","3.13"] | ||
python-version: ["3.9","3.12","3.13"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we removing 3.8 and 3.11? |
||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"] | ||
python-version: ["3.8","3.9","3.11","3.12","3.13"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we remove versions here, but add them later in the file? |
||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
@@ -121,7 +121,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"] | ||
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# This script generates tox.ini and CI YAML files in one go. | ||
|
||
set -xe | ||
|
||
cd "$(dirname "$0")" | ||
|
||
python -m venv .venv | ||
. .venv/bin/activate | ||
|
||
pip install -e .. | ||
pip install -r populate_tox/requirements.txt | ||
pip install -r split_tox_gh_actions/requirements.txt | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same general idea of using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It probably is possible but would be a bit of a larger overhaul. I think @antonpirker was already looking into switching to uv and was also happy about the performance. So this is something we can definitely consider. |
||
|
||
python populate_tox/populate_tox.py | ||
python split_tox_gh_actions/split_tox_gh_actions.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General question (not related to this PR): Have we thought about using
uv pip
here? In my experience, it is much faster thanpip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #3920 (comment), we can consider this, but not in this PR.