Skip to content

Commit

Permalink
Merge 9474e06 into 78375ce
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Yang committed Mar 5, 2021
2 parents 78375ce + 9474e06 commit 32c340d
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 58 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/ga-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Run unit tests
on:
push: [ master ]
pull_request:

jobs:
build:
defaults:
run:
working-directory: ignite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
pytorch-channel: [pytorch, pytorch-nightly]
include:
# includes a single build on windows
- os: windows-latest
pytorch-channel: pytorch
python-version: 3.7
skip-distrib-tests: 1
# includes a single build on macosx
- os: macos-latest
pytorch-channel: pytorch
python-version: 3.7
skip-distrib-tests: 1

steps:
- uses: actions/checkout@v2
- run: git clone https://github.com/pytorch/ignite

- name: Get year & week number
id: get-date
run: |
echo "::set-output name=date::$(/bin/date "+%Y-%U")"
shell: bash -l {0}

- name: Get pip cache dir
id: pip-cache
run: |
pip3 install -U --user pip
echo "::set-output name=dir::$(pip3 cache dir)"
shell: bash -l {0}

- uses: actions/cache@v2
with:
path: |
~/conda_pkgs_dir
${{ steps.pip-cache.outputs.dir }}
key: ${{ steps.get-date.outputs.date }}-pytorch-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ steps.get-date.outputs.date }}-pytorch-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

- name: Install dependencies
shell: bash -l {0}
run: |
conda install pytorch torchvision cpuonly -c ${{ matrix.pytorch-channel }}
pip install -r requirements-dev.txt
python setup.py install
- name: Check code formatting
shell: bash -l {0}
run: |
pip install flake8 "black==19.10b0" "isort==5.7.0"
flake8 ignite/ tests/ examples/
black --check .
isort -c --profile black .
- name: Run Mypy
shell: bash -l {0}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pip install mypy
mypy --config-file mypy.ini
- name: Run Tests
shell: bash -l {0}
run: |
SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh
- uses: actions/upload-artifact@v2
with:
path: ./coverage.xml
58 changes: 0 additions & 58 deletions .github/workflows/lightning.yml

This file was deleted.

0 comments on commit 32c340d

Please sign in to comment.