Skip to content

Commit

Permalink
Merge pull request #760 from conda-forge/fix-tests-for-new-automerge
Browse files Browse the repository at this point in the history
test: ensure old workflow files are removed
  • Loading branch information
beckermr authored Nov 5, 2024
2 parents 56bfb15 + 4cc2059 commit 401a5c0
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 98 deletions.
115 changes: 52 additions & 63 deletions conda-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,15 @@ package:
python-dateutil: '>=2.1,<3.0.0'
urllib3: '>=1.25.4,!=2.2.0,<3'
hash:
md5: f5a4167efcae6e9cfa36f7010beccb82
sha256: 8a2da90195f25db57dc859a87f573d4509ebca59d9fa9157f7c6973654a99167
md5: e4b44d26ac2aeba09162e2736581918e
sha256: 0241483ccece78bd5d705a85cf467dee0a40db57a8f2827d0be6e1b22c77b311
manager: conda
name: botocore
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/botocore-1.35.53-pyge310_1234567_0.conda
version: 1.35.53
https://conda.anaconda.org/conda-forge/noarch/botocore-1.35.54-pyge310_1234567_0.conda
version: 1.35.54
- category: main
dependencies:
__glibc: '>=2.17,<3.0.a0'
Expand Down Expand Up @@ -316,33 +316,33 @@ package:
- category: main
dependencies:
msgpack-python: '>=0.5.2,<2.0.0'
python: '>=3.7'
python: '>=3.8'
requests: '>=2.16.0'
hash:
md5: a54e449940b3e4bb2129b8daae0c1f65
sha256: 8d8dadbea881c690037e432075357ad6629f7b050e129a5944a0402d674fd754
md5: e2ab0c0094abfe6021c0b03b7a54cbec
sha256: 144327f53a9a3b1e76f378da88b0e04cb8534c31838f4a393650adb07872c333
manager: conda
name: cachecontrol
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.14.0-pyhd8ed1ab_1.conda
version: 0.14.0
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.14.1-pyhd8ed1ab_0.conda
version: 0.14.1
- category: main
dependencies:
cachecontrol: 0.14.0
cachecontrol: 0.14.1
filelock: '>=3.8.0'
python: '>=3.7'
python: '>=3.8'
hash:
md5: 42a12b0b21d64b36a9ab9a24a04eb910
sha256: 482d0f3ce8dad6b881f76620ee18152755c61bb968039dcbc0ad45689c70b0d5
md5: 7086cfe05f71ea0d9a509b4e3509554d
sha256: 1d84e360e3e9aba097dc40ca5c081ab28712be07c118e2039eca094f563cf0b4
manager: conda
name: cachecontrol-with-filecache
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.14.0-pyhd8ed1ab_1.conda
version: 0.14.0
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.14.1-pyhd8ed1ab_0.conda
version: 0.14.1
- category: main
dependencies:
python: '>=3.7'
Expand Down Expand Up @@ -679,15 +679,15 @@ package:
- category: main
dependencies: {}
hash:
md5: 20909339982c2f98619603113bec0270
sha256: ae3e0cf29605dc214360124ea7bae5768915e91b79d419b0cce97fffc81057d6
md5: df4000ad0503acf978106ec0e5caf407
sha256: 95e7a38f039b68ac2066b9ad7a725ded4966aa0e483df3f9caccc5c1c4a1dceb
manager: conda
name: conda-forge-pinning
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/conda-forge-pinning-2024.10.31.23.25.38-hd8ed1ab_0.conda
version: 2024.10.31.23.25.38
https://conda.anaconda.org/conda-forge/noarch/conda-forge-pinning-2024.11.05.14.14.53-hd8ed1ab_0.conda
version: 2024.11.05.14.14.53
- category: main
dependencies:
attrs: ''
Expand Down Expand Up @@ -832,16 +832,18 @@ package:
oras-py: 0.1.14.*
python: '>=3.7'
requests: ''
setuptools: '>=68.2.2'
zstandard: ''
hash:
md5: 8a3a8596d99abe7a1acbf5c794f21624
sha256: ab2228d75f39a860d02df481f26e2df1dc41ebd2d442900fbfe709e059ab36ee
md5: d7614f82bd520f5aee7a78beada5ac30
sha256: 618d76184666b1a23f672f689453ba9ab05bac07deeefe20d954c213247f583b
manager: conda
name: conda-oci-mirror
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/conda-oci-mirror-0.1.0-pyhd8ed1ab_0.conda
version: 0.1.0
https://conda.anaconda.org/conda-forge/noarch/conda-oci-mirror-0.2.1-pyhd8ed1ab_0.conda
version: 0.2.1
- category: main
dependencies:
conda-package-streaming: '>=0.9.0'
Expand Down Expand Up @@ -889,7 +891,7 @@ package:
license-expression: ''
pycryptodome: ''
pygithub: '>=2,<3'
python: '>=3.6'
python: '>=3.9'
rattler-build-conda-compat: '>=1.2.0,<2.0.0a0'
requests: ''
ruamel.yaml: '>=0.16'
Expand All @@ -899,15 +901,15 @@ package:
toolz: ''
vsts-python-api: ''
hash:
md5: 1347fda83050a91d91fe795d46bc74ab
sha256: 251556c2bbe91ba9260dea52ada715bdd078ffdc3d70be19b235bd1b74b426bd
md5: 0941cd6204cc411ac5d9c59afcaead19
sha256: 29b6513a30522f6d9581bddb9dde707d9ee5137014f2fed5b9c58b2cb261e1ea
manager: conda
name: conda-smithy
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/conda-smithy-3.43.2-unix_pyh707e725_0.conda
version: 3.43.2
https://conda.anaconda.org/conda-forge/noarch/conda-smithy-3.44.0-unix_pyhd81877a_0.conda
version: 3.44.0
- category: main
dependencies:
python: '>=3.8'
Expand Down Expand Up @@ -2370,19 +2372,6 @@ package:
url:
https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.2.0-h69a702a_1.conda
version: 14.2.0
- category: main
dependencies:
libgfortran: 14.2.0
hash:
md5: 0a7f4cd238267c88e5d69f7826a407eb
sha256: 423f1e2403f0c665748e42d335e421e53fd03c08d457cfb6f360d329d9459851
manager: conda
name: libgfortran-ng
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-14.2.0-h69a702a_1.conda
version: 14.2.0
- category: main
dependencies:
libgcc: '>=14.2.0'
Expand Down Expand Up @@ -2570,18 +2559,18 @@ package:
- category: main
dependencies:
__glibc: '>=2.17,<3.0.a0'
libgcc-ng: '>=14'
libgfortran-ng: ''
libgfortran5: '>=14.1.0'
libgcc: '>=14'
libgfortran: ''
libgfortran5: '>=14.2.0'
hash:
md5: 9ebc9aedafaa2515ab247ff6bb509458
sha256: 1e41a6d63e07be996238a1e840a426f86068956a45e0c0bb24e49a8dad9874c1
md5: 62857b389e42b36b686331bec0922050
sha256: 99ba271d8a80a1af2723f2e124ffd91d850074c0389c067e6d96d72a2dbfeabe
manager: conda
name: libopenblas
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.28-pthreads_h94d23a6_0.conda
https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.28-pthreads_h94d23a6_1.conda
version: 0.3.28
- category: main
dependencies:
Expand Down Expand Up @@ -3096,15 +3085,15 @@ package:
python: '>=3.11,<3.12.0a0'
python_abi: 3.11.*
hash:
md5: 4e72b55892331ada8fbcf5954df582f2
sha256: da4c6cf1a51afc95aeeecf403cd1efbaed0ab19567d59a3e2e316313073476e4
md5: 1b3c543b0cc96310bcf0b825d5a68cb1
sha256: d2fdae6b0e80c23248f0f6bf7b5e3b6e0f56f69f420e9f5da5a6aae2c95b1493
manager: conda
name: numpy
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.2-py311h71ddf71_0.conda
version: 2.1.2
https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.3-py311h71ddf71_0.conda
version: 2.1.3
- category: main
dependencies:
blinker: ''
Expand Down Expand Up @@ -3815,15 +3804,15 @@ package:
python: '>=3.8'
typing_extensions: '>3.10.0.2'
hash:
md5: 89703b4f38bd1c0353881f085bc8fdaa
sha256: 56aac9317cde48fc8ff59806587afd4d1c262dcd7598f94c0748a2ec51523d09
md5: ae8d4e318695c0d3e3464ed95cc8b385
sha256: 9d10cdc472ae0c3d7c86c0a1dda6332fe725a678186c7ca75c538d5125a69f5b
manager: conda
name: python-utils
optional: false
platform: linux-64
url:
https://conda.anaconda.org/conda-forge/noarch/python-utils-3.8.2-pyhd8ed1ab_0.conda
version: 3.8.2
https://conda.anaconda.org/conda-forge/noarch/python-utils-3.9.0-pyhff2d567_0.conda
version: 3.9.0
- category: main
dependencies: {}
hash:
Expand Down Expand Up @@ -4023,14 +4012,14 @@ package:
python: '>=3.8'
typing_extensions: '>=4.0.0,<5.0.0'
hash:
md5: 50dd5529812447e2b4e2a5dd6a6f1655
sha256: ec2a69babe41085a5bcec4ef80b2d5bade2ca399d971f57894dfb96cf59a18d1
md5: bcf8cc8924b5d20ead3d122130b8320b
sha256: c009488fc07fd5557434c9c1ad32ab1dd50241d6a766e4b2b4125cd6498585a8
manager: conda
name: rich
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/rich-13.9.3-pyhd8ed1ab_0.conda
version: 13.9.3
url: https://conda.anaconda.org/conda-forge/noarch/rich-13.9.4-pyhd8ed1ab_0.conda
version: 13.9.4
- category: main
dependencies:
__glibc: '>=2.17,<3.0.a0'
Expand Down Expand Up @@ -4656,14 +4645,14 @@ package:
libgcc: '>=13'
libstdcxx: '>=13'
hash:
md5: 3c9d4ca2e04ec5f72aa94b88a0440ed6
sha256: bb5df024d49976d2436e0cb6db7b4bcb7d18eb782402dca0816381d08cad7e2d
md5: 3b5a52d360a5abb658d477156b71edd5
sha256: cc1b143394d8bc223cb4518634ad043798f0c804b0ee4bf689d440c785bbed76
manager: conda
name: uv
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/linux-64/uv-0.4.29-h0f3a69f_0.conda
version: 0.4.29
url: https://conda.anaconda.org/conda-forge/linux-64/uv-0.4.30-h0f3a69f_0.conda
version: 0.4.30
- category: main
dependencies:
distlib: <1,>=0.3.7
Expand Down
61 changes: 26 additions & 35 deletions tests/test_live_rerender.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ def _run_test(branch):
assert "MNT:" in output

print("checking rerender undid workflow edits...", flush=True)
with open(".github/workflows/automerge.yml") as fp:
lines = fp.readlines()
assert not any(
line.startswith("# test line for rerender edits") for line in lines
)
if os.path.exists(".github/workflows/automerge.yml"):
with open(".github/workflows/automerge.yml") as fp:
lines = fp.readlines()
assert not any(
line.startswith("# test line for rerender edits")
for line in lines
)

print("tests passed!")

Expand Down Expand Up @@ -143,37 +145,26 @@ def test_live_rerender(pytestconfig):
check=True,
)

print("undoing edit to a workflow...", flush=True)
with open(".github/workflows/automerge.yml") as fp:
lines = fp.readlines()

lines = [
line.strip()
for line in lines
if not line.startswith("# test line for rerender edits")
]

with open(".github/workflows/automerge.yml", "w") as fp:
fp.write("\n".join(lines))

subprocess.run(
["git", "add", "-f", ".github/workflows/automerge.yml"],
check=True,
)
if os.path.exists(".github/workflows/automerge.yml"):
print("removing old workflow file...", flush=True)
subprocess.run(
["git", "rm", "-f", ".github/workflows/automerge.yml"],
check=True,
)

print("committing...", flush=True)
subprocess.run(
[
"git",
"commit",
"--allow-empty",
"-m",
"[ci skip] undo workflow changes if any",
],
check=True,
)
print("committing...", flush=True)
subprocess.run(
[
"git",
"commit",
"--allow-empty",
"-m",
"[ci skip] remove workflow changes if any",
],
check=True,
)

print("push to origin...", flush=True)
subprocess.run(["git", "push"], check=True)
print("push to origin...", flush=True)
subprocess.run(["git", "push"], check=True)

_merge_main_to_branch("rerender-live-test", verbose=True)

0 comments on commit 401a5c0

Please sign in to comment.