-
Notifications
You must be signed in to change notification settings - Fork 86
Integration tests #3417
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
Merged
Merged
Integration tests #3417
Changes from 250 commits
Commits
Show all changes
255 commits
Select commit
Hold shift + click to select a range
85c279a
run update_upstream_versions in tests
ytausch 7ec1130
gather feedstocks in tests + make graph
ytausch 14d95ec
update upstream versions in tests
ytausch 6c6df63
add other make-graph step
ytausch c0bb8bf
enable debugging, deploy, don't update pinnings every time
ytausch bff923f
refactor and fix env vars
ytausch a34e0dd
add pydantic feedstock as a resource
ytausch 6a50924
add IntegrationTestHelper supporting overwriting feedstock contents
ytausch 3349115
Merge branch 'main' into integration-tests
ytausch ac251e2
relock, fix install bot code
ytausch 559da82
fix subprocess call
ytausch dfbf795
set git initial branch
ytausch fcac4ca
fix tests
ytausch ddfe29b
set proxy in update-upstream-versions
ytausch c478c2d
global router + overwrite cf-graph repo
ytausch c65ce89
reorder steps
ytausch aa2b8d5
fix install bot code
ytausch 95d47eb
disable random skipping in integration tests
ytausch 4724945
use correct env name for container image
ytausch d6b5a66
(todo) don't overwrite container image env variables
ytausch 9fc744a
reorder action steps
ytausch ee50def
fix
ytausch 7d19a53
don't create pinning repo
ytausch 84a5060
debug
ytausch 8479a8d
fix
ytausch b3c2a83
debug
ytausch 9e15297
debug
ytausch 1d0eaba
also capture stderr
ytausch 4b28a43
use older version for pydantic
ytausch 289fb55
use lowercase proxy
ytausch 2417f74
set DEPLOY_REPO correctly
ytausch 0cbb33c
tmate action
ytausch 255d203
dont use proxy for tmate
ytausch 22f23ff
fix
ytausch 3a5aacf
fix proxy in container
ytausch 65b18ab
fix
ytausch a1d0ad3
git CLI: don't use proxy
ytausch 39973c5
add make-migrators step
ytausch 5939a01
fix
ytausch f3c91a5
Merge branch 'main' into integration-tests
ytausch 5dc39a7
relock
ytausch 9fafb3f
don't use with sensitive_env
ytausch 7ec0e1f
fix
ytausch c8ade5a
fix
ytausch d1f213a
make GitHub API transparent
ytausch 9d8a0f7
install_bot_code does not need BOT_TOKEN
ytausch d9f91ee
separate bot user token and regro org token
ytausch 56f9caa
Merge branch 'separate-bot-tokens' into integration-tests
ytausch 2ca2b70
apply fixes
ytausch 63fec86
Merge branch 'separate-bot-tokens' into integration-tests
ytausch 2023229
relock
ytausch 395bbd8
fix token
ytausch 541b314
fix URL request handler
ytausch 52a37f5
fix URL request handler
ytausch 0ee5e35
Revert "Merge branch 'separate-bot-tokens' into integration-tests"
ytausch 8394322
Revert "Merge branch 'separate-bot-tokens' into integration-tests"
ytausch c1e2e9b
use classic PAT
ytausch 47f4959
remove tmate
ytausch 44a9a1f
use TEST_SETUP_TOKEN
ytausch 067b397
fix: forward headers
ytausch 0dc16ea
fix proxy
ytausch 9e5351c
make PyPI tarfiles transparent
ytausch b3c9073
route transparent URLs directly by mitmproxy, configure conda-forge org
ytausch 04284a2
use conda-forge-bot-staging everywhere
ytausch 320c71c
fix setup
ytausch 9684e4d
add llvmdev via submodule
ytausch a028330
add pydantic via submodule
ytausch 2dce94b
run make-migrators twice
ytausch 2959dc9
successfully validate new pydantic version
ytausch dc93669
remove llvmdev from integration tests
ytausch 5a122fe
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 1b014ae
Merge branch 'main' into integration-tests
ytausch c3f767b
relock
ytausch 3f7d5b5
fix conda forge org override
ytausch f3b051e
fix typo
ytausch 7ad4547
fix todo: override env variables in install_bot_code.sh
ytausch 1f9f742
fix: don't divide by zero
ytausch 0fe9280
Merge branch 'fix-divide-by-zero' into integration-tests
ytausch cc5a57e
finish docs for integration testing
ytausch 8b8ab07
docs: refer to TRANSPARENT_URLs
ytausch 973d95c
try to run make-migrators a third time
ytausch db1d975
review: fix branch name
ytausch 8c8cf3d
pin GitHub Actions correctly
ytausch d9a2aa3
fix: we don't want to change num_try
ytausch 43e69ed
fix: use CONDA_FORGE_ORG
ytausch f6d4164
move ENV_OVERRIDE_CONDA_FORGE_ORG to settings.py
ytausch 1c0ed33
use debug log level if running workflow in debug mode
ytausch ad43124
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch c2e4ea1
refactor: move env variable name to constant
ytausch f6f63b6
DRY: use identical env variable for cf-graph repository
ytausch e4b7c7c
Revert "try to run make-migrators a third time"
ytausch 4a98416
docs: fix reference to env variables
ytausch 2def52f
use Docker image name consistently
ytausch 3298b88
refactor: rename DEPLOY_REPO to GRAPH_REPO
ytausch 4961401
fix f-string
ytausch e9c848c
clarify bug comment
ytausch 96b7a96
move RANDOM_FRAC_TO_UPDATE to settings
ytausch 320328d
resolve TODO
ytausch 285663d
fix docstring
ytausch 8b4ea6b
fix: reorder try clause
ytausch 0a3d8d1
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 538e50b
fix: add pip install
ytausch c6a67db
fix: move imports to top-level
ytausch d60d8b8
add debug logging to proxy
ytausch 2d78cd6
add CODEOWNERS file to automatically request further reviews
ytausch 334d02d
add CODEOWNERS file
ytausch 6845d98
fix: push 1.x branch to pydantic feedstock
ytausch 4bfc63c
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch aafed46
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 9e09dbc
relock
ytausch a72eb37
move proxy mode to conda-forge-feedstock-ops
ytausch e6ebafc
fix reponses from PyPI API
ytausch ade2668
retrigger ci
ytausch 5877395
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch ef432e7
ruff
ytausch c9c45c4
run integration tests in merge queue
ytausch cacf8a7
add dummy check for setup-repositories
ytausch eae1330
run integration tests on PRs from branches
ytausch 148a4a6
remove dummy workflow
ytausch f1ec5b0
skip on push
ytausch 4fedcf7
review suggestion: reformat
ytausch 867a371
Apply suggestions from code review
ytausch 7fe21f5
separate RANDOM_FRAC_TO_UPDATE for make-graph and update-upstream-ver…
ytausch 6f7b23d
fix comment
ytausch 593a1b9
Merge branch 'main' into integration-tests
beckermr 551bcda
Merge branch 'main' into integration-tests
beckermr 909a5d4
add docstring for settings.py
ytausch 318975c
add type annotations for settings
ytausch 5090805
prevent duplicate kwarg errors
ytausch c9f52e2
use deferred log expressions
ytausch ea9f919
clarify mimicked ClonedFeedstockContext warning
ytausch 7b24fa6
remove "environment variables" comment again
ytausch 7535b95
make graph repo default branch configurable
ytausch fb162b2
defer log expression
ytausch 0d84983
add comment about GITHUB_OUTPUT
ytausch 026fca2
use working-directory instead of cd
ytausch cbd19ec
fix env var
ytausch 23aa196
clarify docstring
ytausch 3bea225
docs: random.shuffle is in-place
ytausch 3e210d0
add docs to explain test scenario collection
ytausch ab6e016
fix images
ytausch 41c461e
fix except AttributeError
ytausch abe3ef3
add shebang
ytausch 2323b89
Update tests_integration/resources/empty-graph/README.md
ytausch ea48c90
docs: clarify arbitrary test case name
ytausch 3bc5f22
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch b7694f2
docs: improve wording wro test scenario
ytausch 2487529
begin refactor integration tests to pytest
ytausch fa0365a
continue refactor integration tests to pytest
ytausch 8c9bc7b
update submodule
ytausch 143d5f3
document mitmproxy
ytausch 6d7d408
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 56f0879
migrate to xprocess for mitmproxy
ytausch caa469a
make dir switches benign
ytausch 456ad43
edit gitignore
ytausch 60988a6
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 612bcb6
make integration tests pass
ytausch e760886
Merge branch 'settings-object' into integration-tests
ytausch fe67d68
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 32d0eae
chore: relock
ytausch 3386c4f
fix: adjust for new settings module
ytausch e4aeacb
feat: add mitmproxy cert wizard, move mitmproxy dir
ytausch 1ae06cb
docs: update docs for integration tests
ytausch de95298
feat: run new test concept everywhere
ytausch 6b198c3
chore: disable Docker caching
ytausch 029d289
fix: condarc file in CI
ytausch f0c6d91
fix: ci-driven development
ytausch 5f819c4
fix: heredoc
ytausch 6e146df
ci: fix script path
ytausch 8cc21ca
ci: debug
ytausch 658e82c
fix: trust script and ci
ytausch 0a86e19
ci: disable debug mode
ytausch f8e64ba
fix: set git identity in integration tests
ytausch 7f5da5b
debug ci
ytausch 36f8164
fix: do proxy alive check via port probing
ytausch 2060cb2
debug ci
ytausch 1112ce8
fix: pass PYTHONPATH to proxy script
ytausch ab85166
ci: enable debug mode
ytausch 75606d5
ci: output proxy logs
ytausch 8b42b44
chore: formatting
ytausch c84e29c
debug ci
ytausch f89f403
debug: more timeout
ytausch e30d987
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 0cb9d68
ci: debug ci with updated dependencies
ytausch 14e6884
test(integration): don't run deploy to github in proxy env
ytausch 6c5967e
ci debug
ytausch 6ed2c1a
test(integration): trust crt file
ytausch 58a5b95
ci: debug ci
ytausch f8c3095
chore: add mitmproxy trust script to gitignore
ytausch 7d725cf
fix(integration-tests): add more URLs to transparent URLs
ytausch 47cf495
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 81d166a
chore: relock conda
ytausch 13776aa
fix: don't reassign os.environ
ytausch 933bec9
fix(integration tests): we also need the http versions of the transpa…
ytausch b478bc6
fix: typo in integration tests, pytest nodist
ytausch 58c4387
complete integration tests
ytausch ed83329
ci: debug
ytausch a66f91c
fix: add CA cert to git
ytausch 2a0c56a
docs: add comment for Python 3.13
ytausch dd6f498
remove debugger
ytausch bf1a54e
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch e3634bd
chore: relock
ytausch 93b3ccb
chore: add conda-lock to .gitattributes
ytausch 481fb9f
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch ec8b193
feat(integration tests): dynamically parametrize tests
ytausch a91a76a
docs(integration-tests): update graphics
ytausch 305a6c0
chore: remove explicit truststore dependency
ytausch c52ef43
docs(integration-tests): add --dist=no flag to pytest
ytausch 139b698
chore: remove clear runner script
ytausch 0bf6595
chore: add original draw.io file
ytausch 591900f
fix: typo
ytausch d6685e1
fix: formatting
ytausch 1267620
fix: spelling
ytausch 96da00b
fix: remove pydantic-settings note
ytausch 13d579f
feat: improve instructions in setup wizard
ytausch e75385f
fix: formatting
ytausch 56e8afe
docs: add note about cloning depth
ytausch 6fc2898
rename home_directory to initial_working_dir
ytausch d2afa6f
fix: dir link
ytausch 2630652
fix: get_test_scenario
ytausch d9fce89
docs: explain PyCharm warning
ytausch e61bb2d
docs: clarify lifetime of TestCase objects
ytausch 7e65060
docs: refer to README in module docstring
ytausch cd1007c
refactor: use monkeypatch.setenv everywhere
ytausch 5dd850d
docs: add docstring to test_scenario
ytausch c30fc7f
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch d712b05
refactor: make coherent lib module for integration testing
ytausch 308625a
fix: you cannot monkeypatch in module level
ytausch f291758
fix: imports
ytausch f645daf
fix: circular imports
ytausch 676324e
fix method call
ytausch 54e0114
fix filesystem path
ytausch f0992c3
relock w/ conda-lock
regro-cf-autotick-bot 964fe3c
Merge branch 'main' into integration-tests
beckermr a3ed077
relock w/ conda-lock
regro-cf-autotick-bot 70f8e28
fix integration test 1
ytausch c83192f
relock
ytausch ec7c5c5
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch e755d98
fix: lower pin for conda_forge_feedstock_ops
ytausch eb708b0
relock w/ conda-lock
regro-cf-autotick-bot 68f161b
relock
ytausch d901c5c
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch f2c89b1
replace svg with markdown
ytausch affd038
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 36f732d
hotfix: pass settings env manually
ytausch cd36ae0
fix: base_url setting
ytausch 912b97d
slahes in URLs are a good thing
ytausch 06ca28a
Merge remote-tracking branch 'origin/main' into integration-tests
ytausch 87dd13e
run ruff
ytausch 98ec78d
Merge branch 'main' into integration-tests
ytausch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docs/ | ||
tests/ | ||
tests_integration/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.git_archival.txt export-subst | ||
|
||
conda-lock.yml merge=binary linguist-language=YAML linguist-generated=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.github/workflows/test-integration.yml @ytausch | ||
conda_forge_tick/contexts.py @ytausch | ||
conda_forge_tick/git_utils.py @ytausch | ||
conda_forge_tick/models/* @ytausch | ||
tests/github_api/* @ytausch | ||
tests/conda_forge_tick/* @ytausch | ||
tests/model/* @ytausch | ||
tests/test_contexts.py @ytausch | ||
tests/test_git_utils.py @ytausch | ||
tests_integration/* @ytausch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Integration Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
merge_group: null | ||
ytausch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
# Integration tests interact with GitHub resources in the integration test infrastructure and therefore | ||
# cannot run concurrently with other integration tests. | ||
concurrency: | ||
group: cf-scripts-integration-tests | ||
cancel-in-progress: false | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
integration-tests: | ||
name: Run Integration Tests | ||
# if triggered by pull_request, only run on non-fork PRs (secrets access needed) | ||
# Nevertheless, this check is always run in the merge queue. | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
path: cf-scripts | ||
submodules: 'true' | ||
|
||
- name: Build Docker Image | ||
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 | ||
with: | ||
context: cf-scripts | ||
push: false | ||
load: true | ||
tags: conda-forge-tick:test | ||
|
||
- name: Setup micromamba | ||
uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2.0.4 | ||
with: | ||
environment-file: cf-scripts/conda-lock.yml | ||
environment-name: cf-scripts | ||
condarc-file: cf-scripts/autotick-bot/condarc | ||
|
||
- name: Run pip install | ||
working-directory: cf-scripts | ||
run: | | ||
pip install --no-deps --no-build-isolation -e . | ||
|
||
- name: Run mitmproxy certificate setup wizard | ||
working-directory: cf-scripts | ||
run: | | ||
# place a script in the mitmproxy directory that will be run by the setup wizard | ||
# to trust the mitmproxy certificate | ||
cat <<EOF > ./tests_integration/.mitmproxy/${{ env.MITMPROXY_WIZARD_HEADLESS_TRUST_SCRIPT }} | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
sudo cp "\$1" /usr/local/share/ca-certificates/mitmproxy.crt | ||
sudo update-ca-certificates | ||
EOF | ||
|
||
./tests_integration/mitmproxy_setup_wizard.sh | ||
env: | ||
MITMPROXY_WIZARD_HEADLESS: true | ||
MITMPROXY_WIZARD_HEADLESS_TRUST_SCRIPT: mitmproxy_trust_script.sh | ||
|
||
- name: Set up git identity | ||
run: | | ||
git config --global user.name "regro-cf-autotick-bot-staging" | ||
git config --global user.email "[email protected]" | ||
|
||
- name: Run Integration Tests with pytest | ||
working-directory: cf-scripts | ||
run: | | ||
pytest -s -v \ | ||
--dist=no \ | ||
tests_integration | ||
env: | ||
BOT_TOKEN: ${{ secrets.GH_TOKEN_STAGING_BOT_USER }} | ||
TEST_SETUP_TOKEN: ${{ secrets.GH_TOKEN_STAGING_BOT_USER }} | ||
|
||
- name: Print Proxy Logs | ||
run: cat /tmp/mitmproxy.log | ||
ytausch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if: always() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "tests_integration/definitions/conda_forge_pinning/resources/feedstock"] | ||
path = tests_integration/lib/_definitions/conda_forge_pinning/resources/feedstock | ||
url = https://github.com/conda-forge/conda-forge-pinning-feedstock.git | ||
[submodule "tests_integration/definitions/pydantic/resources/feedstock"] | ||
path = tests_integration/lib/_definitions/pydantic/resources/feedstock | ||
url = https://github.com/conda-forge/pydantic-feedstock.git | ||
[submodule "tests_integration/definitions/pydantic/resources/feedstock_v1"] | ||
path = tests_integration/lib/_definitions/pydantic/resources/feedstock_v1 | ||
url = https://github.com/conda-forge/pydantic-feedstock.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
No
push
trigger?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.
If we add a push trigger (for main you mean?), we have even more integration test runs that block each other. Since every push to main should happen through the merge queue anyway, I don't see an advantage of adding a push trigger here.
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.
Only asking because we do have it in
tests.yml
. Maybe it's redundant there? @beckermrThere 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.
We do bypass the merge queue sometimes, but that is after the integration tests run on the PR, so this should be fine.