Skip to content

Commit 288d018

Browse files
carmoccalexierule
authored andcommitted
Tune Conda CI timeout and other minor improvements (#10769)
1 parent 4e08de2 commit 288d018

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/ci_test-base.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959

6060
- name: Test Package [only]
6161
run: |
62-
# NOTE: run coverage on tests does not propagate failure status for Win, https://github.com/nedbat/coveragepy/issues/1003
6362
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
6463
6564
- name: Upload pytest test results

.github/workflows/ci_test-conda.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
python-version: ["3.8"] # previous to last Python version as that one is already used in test-full
1818
pytorch-version: ["1.7", "1.8", "1.9", "1.10"] # nightly: add when there's a release candidate
1919

20-
timeout-minutes: 35
20+
timeout-minutes: 30
2121
steps:
2222
- uses: actions/checkout@v2
2323

@@ -29,7 +29,8 @@ jobs:
2929
python ./requirements/adjust_versions.py requirements/extra.txt
3030
python ./requirements/adjust_versions.py requirements/examples.txt
3131
pip install --requirement requirements/devel.txt --find-links https://download.pytorch.org/whl/nightly/torch_nightly.html
32-
pip install pytest-random-order
32+
# set a per-test timeout of 2.5 minutes to fail sooner. this aids with hanging tests
33+
pip install pytest-timeout
3334
pip list
3435
3536
- name: Pull checkpoints from S3
@@ -42,8 +43,7 @@ jobs:
4243
4344
- name: Tests
4445
run: |
45-
# NOTE: run coverage on tests does not propagate failure status for Win, https://github.com/nedbat/coveragepy/issues/1003
46-
coverage run --source pytorch_lightning -m pytest --random-order-seed=1 pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
46+
coverage run --source pytorch_lightning -m pytest --timeout 150 pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
4747
shell: bash -l {0}
4848

4949
- name: Upload pytest results

requirements/adjust_versions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ def test():
8383
else:
8484
requirements_path, torch_version = sys.argv[1], None
8585

86-
with open(requirements_path, "r+") as fp:
86+
with open(requirements_path) as fp:
8787
requirements = fp.read()
88-
requirements = main(requirements, torch_version)
89-
print(requirements) # on purpose - to debug
88+
requirements = main(requirements, torch_version)
89+
print(requirements) # on purpose - to debug
90+
with open(requirements_path, "w") as fp:
9091
fp.write(requirements)

0 commit comments

Comments
 (0)