From 3f5551dd04d6ca234840b0ed68364e38d1b8448a Mon Sep 17 00:00:00 2001 From: hankcs Date: Wed, 10 Jul 2024 23:20:28 -0700 Subject: [PATCH] Test on ubuntu-latest, macos-latest, windows-latest --- .github/workflows/unit-tests.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3937ddf7b..b132f97df 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -47,20 +47,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Cache dependencies - id: cache-pip - uses: actions/cache@v3 - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }} - - - if: ${{ steps.cache-pip.outputs.cache-hit != 'true' }} - name: Install dependencies + - name: Install dependencies + shell: bash run: | - python -m pip install -e plugins/hanlp_trie - python -m pip install -e plugins/hanlp_common - python -m pip install -e . - python -m pip install pytest + python3 -m pip install --upgrade pip + python3 -m pip install -e plugins/hanlp_trie + python3 -m pip install -e plugins/hanlp_common + python3 -m pip install -e . + python3 -m pip install pytest - name: Cache data uses: actions/cache@v3 @@ -69,6 +63,7 @@ jobs: key: hanlp-data - name: Test with pytest + shell: bash run: | pytest tests pytest plugins/hanlp_trie/tests