diff --git a/.github/workflows/offline_tests.yml b/.github/workflows/offline_tests.yml index a6e257d9..d7b2dd61 100644 --- a/.github/workflows/offline_tests.yml +++ b/.github/workflows/offline_tests.yml @@ -10,27 +10,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry + - name: Set up Python uses: actions/setup-python@v5 with: python-version: 3.11 cache: "poetry" - # Install poetry with virtualenvs disabled for tests - - name: Install poetry and dependencies + - name: Install dependencies + working-directory: ./src run: | - python -m pip install --upgrade pip - python -m pip install poetry - cd src poetry install - - # en_core_web_sm required by spacy needs to be installed separately - - name: Install extra dependencies - run: | - cd src poetry run python -m spacy download en_core_web_sm - name: Run tests - run: | - cd src + working-directory: ./src + run: poetry run pytest --cov=sherpa_ai tests diff --git a/.github/workflows/online_tests.yml b/.github/workflows/online_tests.yml index f1117b5c..2676d90b 100644 --- a/.github/workflows/online_tests.yml +++ b/.github/workflows/online_tests.yml @@ -10,24 +10,19 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry + - name: Set up Python uses: actions/setup-python@v5 with: python-version: 3.11 cache: "poetry" - # Install poetry with virtualenvs disabled for tests - - name: Install poetry and dependencies - run: | - python -m pip install --upgrade pip - python -m pip install poetry - cd src - poetry config virtualenvs.create false - poetry install - # en_core_web_sm required by spacy needs to be installed separately - - name: Install extra dependencies + - name: Install dependencies + working-directory: ./src run: | - cd src + poetry install poetry run python -m spacy download en_core_web_sm - name: Run tests @@ -43,6 +38,6 @@ jobs: GITHUB_AUTH_TOKEN: ${{ secrets.GITHUBOATHKEY }} DAILY_TOKEN_LIMIT: ${{ secrets.TOKENLIMIT }} TEMPRATURE: ${{ secrets.TEMPRATURE }} - run: | - cd src + working-directory: ./src + run: poetry run pytest --external_api --cov=sherpa_ai tests