Skip to content

Commit

Permalink
Fix tutorial testing workflow (#348)
Browse files Browse the repository at this point in the history
* Fix tutorials for Haystack 2 testing workflow

* Trigger CI for testing

* Remove some common dependencies

* Update some actions versions

* Fix testing v1 tutorials

* Trigger CI

* More fixes

* Fix version variable

* Revert "Trigger CI for testing"

This reverts commit 18b309c.

* Revert "Trigger CI"

This reverts commit dfc9ea8.
  • Loading branch information
silvanocerza committed Sep 13, 2024
1 parent bb373ce commit 67ed9d1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dc_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -44,9 +44,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/full_dc_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
matrix_v1: ${{ steps.generator.outputs.matrix_v1 }}
matrix_v2: ${{ steps.generator.outputs.matrix_v2 }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- id: generator
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
# remove pip install pyzmq when this is resolved https://github.com/zeromq/pyzmq/issues/1764
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install common dependencies
run: |
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/run_tutorials_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
outputs:
matrix: ${{ steps.filter.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand All @@ -54,6 +54,7 @@ jobs:
id: files
uses: tj-actions/changed-files@v44
with:
matrix: true
# We only want v1 tutorials, this is a necessary duplication
files: |
tutorials/01_Basic_QA_Pipeline.ipynb
Expand Down Expand Up @@ -90,9 +91,9 @@ jobs:
matrix = json.loads(os.environ["MATRIX"])
changed_files = json.loads(os.environ["CHANGED_FILES"])
new_matrix = {"include": []}
for item in matrix:
for item in matrix["include"]:
notebook = item["notebook"]
if f"tutorials/{notebook}" not in changed_files:
if f"tutorials/{notebook}.ipynb" not in changed_files:
continue
new_matrix["include"].append(item)
Expand All @@ -102,8 +103,8 @@ jobs:
run-tutorials:
runs-on: ubuntu-latest
needs: get-latest-version
container: deepset/haystack:base-cpu-${{ matrix.version }}
needs: generate-matrix
container: deepset/haystack:base-cpu-${{ matrix.haystack_version }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -137,7 +138,7 @@ jobs:
pip install "datasets>=2.6.1"
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# See https://github.com/actions/runner-images/issues/6775
- name: Change Owner of Container Working Directory
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/run_tutorials_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
outputs:
matrix: ${{ steps.filter.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand All @@ -58,7 +58,7 @@ jobs:
id: files
uses: tj-actions/changed-files@v44
with:
json: true
matrix: true
files: tutorials/*.ipynb
# Ignore all 1.x tutorials, we can remove this as soon as we drop support for it
files_ignore: |
Expand Down Expand Up @@ -102,9 +102,9 @@ jobs:
matrix = json.loads(os.environ["MATRIX"])
changed_files = json.loads(os.environ["CHANGED_FILES"])
new_matrix = {"include": []}
for item in matrix:
for item in matrix["include"]:
notebook = item["notebook"]
if f"tutorials/{notebook}" not in changed_files:
if f"tutorials/{notebook}.ipynb" not in changed_files:
continue
new_matrix["include"].append(item)
Expand All @@ -115,7 +115,7 @@ jobs:
run-tutorials:
runs-on: ubuntu-latest
needs: generate-matrix
container: deepset/haystack:base-${{ matrix.version }}
container: deepset/haystack:base-${{ matrix.haystack_version }}

strategy:
fail-fast: false
Expand All @@ -129,7 +129,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install common dependencies
run: |
Expand All @@ -140,7 +140,6 @@ jobs:
ffmpeg
pip install nbconvert ipython
pip install "pyworld<=0.2.12" espnet espnet-model-zoo pydub
- name: Install tutorial dependencies
if: toJSON(matrix.dependencies) != '[]'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/verify_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down

0 comments on commit 67ed9d1

Please sign in to comment.