diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5366f69cc..62d6350d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Find the changed files id: find-changed-files uses: tj-actions/changed-files@v35 @@ -75,7 +76,7 @@ jobs: - name: Unit Testing run: | - PYTHONPATH=$PWD pytest tests + PYTHONPATH=$PWD pytest --cov=. --cov-report lcov tests env: DATA: /data/scratch/cifar-10 NCCL_SHM_DISABLE: 1 diff --git a/.gitignore b/.gitignore index 6b6f980e3..8e345eeb8 100644 --- a/.gitignore +++ b/.gitignore @@ -151,3 +151,6 @@ colossalai/version.py # ignore python interface defition file .pyi + +# ignore coverage test file +converage.lcov diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index f9e8960d2..9ef0a682b 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -1,5 +1,6 @@ fbgemm-gpu==0.2.0 pytest +pytest-cov torchvision transformers timm