mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-01 01:27:28 +00:00
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Examples tests
|
|
|
|
on:
|
|
workflow_dispatch: # Activate this workflow manually
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- examples/**
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
|
PYTHON_VERSION: "3.8"
|
|
|
|
jobs:
|
|
tests:
|
|
name: Examples
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
elasticsearch:
|
|
image: elasticsearch:7.17.6
|
|
env:
|
|
discovery.type: "single-node"
|
|
ES_JAVA_OPTS: "-Xms128m -Xmx256m"
|
|
ports:
|
|
- 9200:9200
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- name: Install Haystack
|
|
run: pip install .[all]
|
|
|
|
- name: Run
|
|
run: pytest examples/
|
|
|
|
- uses: slackapi/slack-github-action@v1.23.0
|
|
if: failure() && github.ref == 'refs/heads/main'
|
|
with:
|
|
payload-file-path: .github/config/failure-message-slack-payload.json
|