From 84500b7799232974d3f230f13c2c018fc8424392 Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Wed, 24 May 2023 14:59:40 +0800 Subject: [PATCH] [workflow] fixed testmon cache in build CI (#3806) * [workflow] fixed testmon cache in build CI * polish code --- .github/workflows/build_on_pr.yml | 4 ++-- .gitignore | 4 ++++ requirements/requirements-test.txt | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_on_pr.yml b/.github/workflows/build_on_pr.yml index 53355f560..a5a17d176 100644 --- a/.github/workflows/build_on_pr.yml +++ b/.github/workflows/build_on_pr.yml @@ -136,7 +136,7 @@ jobs: - name: Restore Testmon Cache run: | if [ -d /github/home/testmon_cache ]; then - [ ! -z "$(ls -A /github/home/testmon_cache)" ] && cp -p -r /github/home/testmon_cache/.testmondata /__w/ColossalAI/ColossalAI/ + [ ! -z "$(ls -A /github/home/testmon_cache)" ] && cp -p -r /github/home/testmon_cache/.testmondata* /__w/ColossalAI/ColossalAI/ fi - name: Execute Unit Testing @@ -150,7 +150,7 @@ jobs: - name: Store Testmon Cache run: | [ -d /github/home/testmon_cache ] || mkdir /github/home/testmon_cache - cp -p -r /__w/ColossalAI/ColossalAI/.testmondata /github/home/testmon_cache/ + cp -p -r /__w/ColossalAI/ColossalAI/.testmondata* /github/home/testmon_cache/ - name: Collate artifact env: diff --git a/.gitignore b/.gitignore index bf74a7538..81113fa99 100644 --- a/.gitignore +++ b/.gitignore @@ -155,3 +155,7 @@ colossalai/version.py # ignore coverage test file coverage.lcov coverage.xml + +# ignore testmon and coverage files +.coverage +.testmondata* diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 55edb1b6a..6895113bc 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -1,6 +1,7 @@ diffusers fbgemm-gpu==0.2.0 pytest +coverage==7.2.3 git+https://github.com/hpcaitech/pytest-testmon torchvision transformers