From 53bb8682a2e5a0bfe3e3925d943f13ebc9df879d Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Mon, 9 Jan 2023 17:57:57 +0800 Subject: [PATCH] [worfklow] added coverage test (#2399) * [worfklow] added coverage test * polish code * polish code * polish code * polish code * polish code * polish code * polish code * polish code --- .github/workflows/build.yml | 3 ++- .gitignore | 3 +++ requirements/requirements-test.txt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) 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