From 6411fabf05a75e2beb82b29fed614dbd12688f7f Mon Sep 17 00:00:00 2001 From: purificant Date: Mon, 26 Jul 2021 14:24:45 +0100 Subject: [PATCH] cache improvements, enable gensim tests, more verbose test output for skipped and failed tests (#2756) --- .github/workflows/ci.yaml | 10 +++++++--- requirements-ci.txt | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e36f5318cb..acac20bdb8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,15 +12,17 @@ jobs: - name: Cache nltk data uses: actions/cache@v2 + id: restore-cache with: path: ~/nltk_data key: nltk_data - - name: Download nltk data packages + - name: Download nltk data packages on cache miss run: | pip install regex # dependencies needed to download nltk data python -c "import nltk; nltk.download('all')" shell: bash + if: steps.restore-cache.outputs.cache-hit != 'true' test: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} @@ -42,12 +44,14 @@ jobs: - name: Cache dependencies uses: actions/cache@v2 + id: restore-cache with: path: ${{ env.pythonLocation }} key: python-dependencies-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements-ci.txt') }}-${{ env.pythonLocation }} - - name: Install dependencies + - name: Install dependencies on cache miss run: pip install --upgrade --requirement requirements-ci.txt + if: steps.restore-cache.outputs.cache-hit != 'true' - name: Use cached nltk data uses: actions/cache@v2 @@ -56,5 +60,5 @@ jobs: key: nltk_data - name: Run pytest - run: pytest --numprocesses auto nltk/test + run: pytest --numprocesses auto -rsx nltk/test shell: bash diff --git a/requirements-ci.txt b/requirements-ci.txt index 73d7320272..4e65e873b7 100644 --- a/requirements-ci.txt +++ b/requirements-ci.txt @@ -1,3 +1,4 @@ +gensim<4.0.0 matplotlib pytest pytest-mock