bump version #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you change this name also do it in tests_skipper.yml and ci_metrics.yml | |
name: Tests | |
on: | |
# Activate this workflow manually | |
workflow_dispatch: | |
# Run tests nightly against Haystack's main branch | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
paths: | |
# Keep the list in sync with the paths defined in the `tests_skipper.yml` workflow | |
- "haystack_experimental/**/*.py" | |
- "test/**/*.py" | |
- "pyproject.toml" | |
env: | |
PYTHON_VERSION: "3.8" | |
HATCH_VERSION: "1.9.4" | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Check code format | |
run: hatch fmt | |
- name: Linting | |
run: hatch run test:lint | |
- name: Typing | |
run: hatch run test:typing | |
unit-tests: | |
name: Unit / ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ env.PYTHON_VERSION }}" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run | |
run: hatch run test:cov | |
- name: Coveralls | |
# We upload only coverage for ubuntu as handling both os | |
# complicates the workflow too much for little to no gain | |
if: matrix.os == 'ubuntu-latest' | |
uses: coverallsapp/github-action@v2 | |
with: | |
path-to-lcov: coverage.xml | |
- name: Nightly - run unit tests with Haystack main branch | |
if: github.event_name == 'schedule' | |
id: nightly-haystack-main | |
run: | | |
hatch run pip install git+https://github.com/deepset-ai/haystack.git | |
hatch run test:unit |