-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add separate CI job for slow tests #10830
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e7f5c6c
Add separate CI job for slow tests
carmocca 36c8888
Fixes
carmocca 75bfbe2
Fix typo
carmocca c13b159
Fix
carmocca 6b814fa
Avoid required torchtext import
carmocca c4c177f
Avoid installing omegaconf to run tests
carmocca da2a657
Avoid installing matplotlib and pandas
carmocca 4a1af55
Merge branch 'master' into ci/slow
carmocca ac18de9
Merge branch 'master' into ci/slow
carmocca 68e2f65
Add MacOS
carmocca 2ce7a8a
Xfail until fixed
carmocca 0fac8dd
Merge branch 'master' into ci/slow
carmocca f3f1773
Update
carmocca 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 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,83 @@ | ||
name: Test | ||
|
||
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: # Trigger the workflow on push or pull request, but only for the master branch | ||
push: | ||
branches: [master, "release/*"] | ||
pull_request: | ||
branches: [master, "release/*"] | ||
|
||
jobs: | ||
slow: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] | ||
# same config as '.azure-pipelines/gpu-tests.yml' | ||
python-version: ["3.7"] | ||
pytorch-version: ["1.8"] | ||
|
||
timeout-minutes: 20 | ||
carmocca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Weekly reset caching | ||
carmocca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)" | ||
id: times | ||
|
||
- name: Get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
|
||
- name: Cache pip | ||
carmocca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-td${{ steps.times.outputs.period }}-py${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-td${{ steps.times.outputs.period }}-py${{ matrix.python-version }}- | ||
|
||
- name: Install dependencies | ||
run: | | ||
# adjust versions according installed Torch version | ||
python ./requirements/adjust_versions.py requirements.txt ${{ matrix.pytorch-version }} | ||
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade | ||
pip install --requirement requirements/test.txt | ||
pip list | ||
shell: bash | ||
|
||
- name: Tests | ||
run: | | ||
coverage run --source pytorch_lightning -m pytest tests -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
env: | ||
PL_RUN_SLOW_TESTS: 1 | ||
carmocca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }} | ||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
if: failure() | ||
|
||
- name: Statistics | ||
if: success() | ||
run: | | ||
coverage report | ||
coverage xml | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
if: success() | ||
# see: https://github.com/actions/toolkit/issues/399 | ||
continue-on-error: true | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: coverage.xml | ||
flags: cpu,pytest,torch${{ matrix.pytorch-version }} | ||
name: CPU-coverage | ||
fail_ci_if_error: false |
This file contains 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 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 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 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 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
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.
just noticed that here we skip run on Windows and all minimal requirements?
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.
Yes, I wanted to keep this light at first as we don't run many tests at the moment. These can be added later