Bump dawidd6/action-download-artifact from 2 to 6 in /.github/workflows #363
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
name: Unit Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
unittests: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- name: Log | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Miniconda | |
uses: conda-incubator/[email protected] | |
with: | |
auto-update-conda: true | |
python-version: 3.7 | |
- name: sanity-check | |
shell: bash -l {0} | |
run: | | |
conda env create -n gluon_cv_lint -f ./tests/pylint.yml | |
conda env update -n gluon-cv-lint -f ./tests/pylint.yml --prune | |
conda activate gluon-cv-lint | |
conda list | |
make clean | |
make pylint | |
- name: unit-test | |
shell: bash -l {0} | |
run: | | |
conda env create -n gluon_cv_py3_test -f tests/py3_mxnet_ci.yml | |
conda activate gluon_cv_py3_test | |
pip install --upgrade pip setuptools wheel | |
pip install --upgrade -e . | |
export TINY_COCO=~/.mxnet/datasets/tiny_coco | |
export TINY_MOTORBIKE=~/.mxnet/datasets/tiny_motorbike | |
mkdir -p $TINY_COCO/annotations | |
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/mini_coco/sub_val.zip --output sub_val.zip | |
unzip -q sub_val.zip -d $TINY_COCO | |
mv $TINY_COCO/sub_val $TINY_COCO/val2017 | |
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/mini_coco/instances_val2017_tiny.json --output instances_val2017_tiny.json | |
mv instances_val2017_tiny.json $TINY_COCO/annotations | |
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/tiny_motorbike.zip --output tiny_motorbike.zip | |
unzip -q tiny_motorbike.zip -d $TINY_MOTORBIKE | |
nosetests --with-timer --timer-ok 5 --timer-warning 20 -x --with-coverage --cover-package gluoncv -v tests/unittests | |
- name: Save github context info(For push) | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
echo "${{ github.ref }}" | |
echo "${{ github.repository }}" | |
mkdir git_context | |
echo "${{ github.ref }}" > git_context/ref.atf | |
echo "${{ github.repository }}" > git_context/repo.atf | |
- name: Save github context info(For pull request) | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} | |
run: | | |
echo "${{ github.event.pull_request.head.ref }}" | |
echo "${{ github.event.pull_request.head.repo.full_name }}" | |
echo "${{ github.event.number }}" | |
echo "${{ github.event.pull_request.head.sha }}" | |
mkdir git_context | |
echo "${{ github.event.pull_request.head.ref }}" > git_context/ref.atf | |
echo "${{ github.event.pull_request.head.repo.full_name }}" > git_context/repo.atf | |
echo "${{ github.event.number }}" > git_context/pr.atf | |
echo "${{ github.event.pull_request.head.sha }}" > git_context/sha.atf | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
path: git_context |