Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
CI: Use new syntax for setting github output (#1477)
Browse files Browse the repository at this point in the history
Update github output
  • Loading branch information
akihironitta authored Nov 5, 2022
1 parent eb2113a commit dec57a9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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' )
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dec57a9

Please sign in to comment.