11# this jobs runs `pytest` over the source directory. It does not install any extra dependencies.
22# this is useful to catch errors where an import has been added which is not part of the basic dependencies.
3- name : Test
3+ name : Test simple
44
55# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
66on : # Trigger the workflow on push or pull request, but only for the master branch
@@ -9,6 +9,10 @@ on: # Trigger the workflow on push or pull request, but only for the master bra
99 pull_request :
1010 branches : [master, "release/*"]
1111
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
14+ cancel-in-progress : ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
15+
1216jobs :
1317 source :
1418 runs-on : ${{ matrix.os }}
@@ -36,16 +40,14 @@ jobs:
3640 # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
3741 - name : Get pip cache
3842 id : pip-cache
39- run : |
40- python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
43+ run : python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
4144
4245 - name : Cache pip
4346 uses : actions/cache@v2
4447 with :
4548 path : ${{ steps.pip-cache.outputs.dir }}
4649 key : ${{ runner.os }}-pip-td${{ steps.times.outputs.period }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ hashFiles('requirements.txt') }}
47- restore-keys : |
48- ${{ runner.os }}-pip-td${{ steps.times.outputs.period }}-py${{ matrix.python-version }}-${{ matrix.requires }}-
50+ restore-keys : ${{ runner.os }}-pip-td${{ steps.times.outputs.period }}-py${{ matrix.python-version }}-${{ matrix.requires }}-
4951
5052 - name : Install dependencies
5153 run : |
5961
6062 - name : Test Package [only]
6163 run : |
62- coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
63-
64- - name : Upload pytest test results
65- uses : actions/upload-artifact@v2
66- with :
67- name : pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
68- path : junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
69- if : failure()
64+ coverage run --source pytorch_lightning -m pytest pytorch_lightning -v
7065
7166 - name : Statistics
7267 if : success()
0 commit comments