forked from deepset-ai/haystack-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first commit * first try * fix cell * remove test clause
- Loading branch information
Showing
5 changed files
with
281 additions
and
90 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Run Tutorials Nightly | ||
|
||
on: | ||
workflow_dispatch: # Activate this workflow manually | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
run-tutorials: | ||
runs-on: ubuntu-latest | ||
container: deepset/haystack:base-massi-docker | ||
|
||
services: | ||
elasticsearch: | ||
image: elasticsearch:7.9.2 | ||
env: | ||
discovery.type: "single-node" | ||
ES_JAVA_OPTS: "-Xms128m -Xmx256m" | ||
|
||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
notebook: | ||
# Note: use only the name of the file without the extension | ||
- 01_Basic_QA_Pipeline | ||
|
||
env: | ||
ELASTICSEARCH_HOST: "elasticsearch" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install jupyter | ||
run: | | ||
pip install nbconvert | ||
- name: Convert notebook to Python | ||
run: | | ||
jupyter nbconvert --to python --RegexRemovePreprocessor.patterns '%%bash' ./tutorials/${{ matrix.notebook }}.ipynb | ||
- name: Run the converted notebook | ||
run: | | ||
python ./tutorials/${{ matrix.notebook }}.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Run Tutorials | ||
|
||
on: | ||
workflow_dispatch: # Activate this workflow manually | ||
pull_request: | ||
paths: | ||
- 'tutorials/*.ipynb' | ||
|
||
jobs: | ||
run-tutorials: | ||
runs-on: ubuntu-latest | ||
container: deepset/haystack:base-massi-docker | ||
|
||
services: | ||
elasticsearch: | ||
image: elasticsearch:7.9.2 | ||
env: | ||
discovery.type: "single-node" | ||
ES_JAVA_OPTS: "-Xms128m -Xmx256m" | ||
|
||
env: | ||
ELASTICSEARCH_HOST: "elasticsearch" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install jupyter | ||
run: | | ||
pip install nbconvert | ||
- name: Files changed | ||
uses: jitterbit/get-changed-files@v1 | ||
id: files | ||
with: | ||
format: space-delimited | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Convert notebooks to Python | ||
run: | | ||
for changed_file in ${{ steps.files.outputs.all }}; do | ||
if [[ $changed_file == *".ipynb" ]]; then | ||
echo $changed_file | ||
jupyter nbconvert --to python --RegexRemovePreprocessor.patterns '%%bash' ${changed_file} | ||
fi | ||
done | ||
- name: Run the converted notebooks | ||
run: | | ||
find ./tutorials -name "*.py" -execdir python {} \; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Avoid checking in Python files by mistake | ||
# in the tutorials folder. | ||
*.py |
Oops, something went wrong.