Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .azure/app-cloud-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"
paths:
include:
- ".azure/app-cloud-e2e.yml"
- "requirements/app/**"
- "src/lightning_app/**"
- "examples/app_*"

pr:
- "master"
Expand Down
7 changes: 7 additions & 0 deletions .azure/hpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"
paths:
include:
- ".azure/hpu-tests.yml"
- "examples/pl_hpu/mnist_sample.py"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "tests/tests_pytorch/**"

pr:
- "master"
Expand Down
9 changes: 0 additions & 9 deletions .github/file-filters.yml

This file was deleted.

38 changes: 9 additions & 29 deletions .github/workflows/ci-pytorch-test-slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on: # Trigger the workflow on push or pull request, but only for the master bra
pull_request:
branches: [master, "release/*"]
types: [opened, reopened, ready_for_review, synchronize]
paths:
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "tests/tests_pytorch/**"
- "setup.cfg" # includes pytest config
- ".github/workflows/ci-pytorch-test-slow.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
Expand All @@ -28,43 +34,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v29.0.1

- name: Decide if the test should be skipped
id: skip
shell: bash -l {0}
run: |
FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*'
echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr " " "\n" > changed_files.txt
MATCHES=$(cat changed_files.txt | grep -E $FILTER)
echo $MATCHES
if [ -z "$MATCHES" ]; then
echo "Skip"
echo "::set-output name=continue::0"
else
echo "Continue"
echo "::set-output name=continue::1"
fi

- uses: actions/setup-python@v4
if: ${{ (steps.skip.outputs.continue == '1') }}
with:
python-version: ${{ matrix.python-version }}

- name: Reset caching
if: ${{ (steps.skip.outputs.continue == '1') }}
run: python -c "import time; days = time.time() / 60 / 60 / 24; print(f'TIME_PERIOD=d{int(days / 2) * 2}')" >> $GITHUB_ENV

- name: Get pip cache
if: ${{ (steps.skip.outputs.continue == '1') }}
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
if: ${{ (steps.skip.outputs.continue == '1') }}
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
Expand All @@ -73,7 +55,6 @@ jobs:
${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-py${{ matrix.python-version }}-

- name: Install dependencies
if: ${{ (steps.skip.outputs.continue == '1') }}
env:
PACKAGE_NAME: pytorch
FREEZE_REQUIREMENTS: 1
Expand All @@ -85,29 +66,28 @@ jobs:
shell: bash

- name: Testing PyTorch
if: ${{ (steps.skip.outputs.continue == '1') }}
working-directory: tests/tests_pytorch
run: coverage run --source pytorch_lightning -m pytest -v --junitxml=results-${{ runner.os }}-py${{ matrix.python-version }}.xml
env:
PL_RUN_SLOW_TESTS: 1

- name: Upload pytest test results
if: ${{ (failure()) && (steps.skip.outputs.continue == '1') }}
if: failure()
uses: actions/upload-artifact@v3
with:
name: unittest-results-${{ runner.os }}-py${{ matrix.python-version }}
path: tests/tests_pytorch/results-${{ runner.os }}-py${{ matrix.python-version }}.xml

- name: Statistics
if: ${{ (success()) && (steps.skip.outputs.continue == '1') }}
if: success()
working-directory: tests/tests_pytorch
run: |
coverage report
coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: ${{ (success()) && (steps.skip.outputs.continue == '1') }}
if: success()
# see: https://github.com/actions/toolkit/issues/399
continue-on-error: true
with:
Expand Down