diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 6f97665f23..08cf84744c 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -11,6 +11,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }} +defaults: + run: + shell: bash + jobs: pytest: @@ -68,8 +72,7 @@ jobs: - name: Install graphviz if: contains( matrix.topic , 'serve' ) - run: | - sudo apt-get install graphviz + run: sudo apt-get install graphviz - name: Set min. dependencies if: matrix.requires == 'oldest' @@ -80,16 +83,13 @@ jobs: open(fname, 'w').writelines(lines) shell: python - - run: echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)" + - run: echo "period=$(python -c 'import time; days = time.time() / 60 / 60 / 24; print(int(days / 7))' 2>&1)" >> $GITHUB_OUTPUT if: matrix.requires == 'latest' id: times - # Note: This uses an internal pip API and may not always work - # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow - - name: Get pip cache + - name: Get pip cache dir id: pip-cache - run: | - python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" + run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: Cache pip uses: actions/cache@v3 @@ -115,7 +115,6 @@ jobs: pip install torch>=1.7.1 pip install '.[${{ join(matrix.topic, ',') }}]' --upgrade $flag --find-links https://download.pytorch.org/whl/cpu/torch_stable.html pip install '.[test]' --upgrade - shell: bash - name: Install vissl if: contains( matrix.topic , 'image_extras' ) @@ -148,7 +147,8 @@ jobs: FLASH_TEST_TOPIC: ${{ join(matrix.topic,',') }} FIFTYONE_DO_NOT_TRACK: true run: | - coverage run --source flash -m pytest flash tests --reruns 3 --reruns-delay 2 -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + coverage run --source flash -m pytest flash tests --reruns 3 --reruns-delay 2 -v \ + --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Upload pytest test results uses: actions/upload-artifact@v3