From db4a5a7a78d763915c3d99aeff64bc928a38b3d8 Mon Sep 17 00:00:00 2001 From: Kenneth Enevoldsen Date: Tue, 25 Nov 2025 17:07:05 +0100 Subject: [PATCH] ci: Add HF_TOKEN to dataset loading and merge CI --- .github/workflows/dataset_loading.yml | 27 ++++++++++++++--------- .github/workflows/dataset_loading_pr.yml | 28 ------------------------ 2 files changed, 17 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/dataset_loading_pr.yml diff --git a/.github/workflows/dataset_loading.yml b/.github/workflows/dataset_loading.yml index 3f8b4b040f..0f525dc946 100644 --- a/.github/workflows/dataset_loading.yml +++ b/.github/workflows/dataset_loading.yml @@ -1,27 +1,34 @@ name: Datasets available on HuggingFace - on: push: branches: [main] + pull_request: + paths: + - "mteb/tasks/**.py" jobs: - extract-and-run: + dataset-loading-check: runs-on: ubuntu-latest - steps: - name: Checkout repository - uses: actions/checkout@v3 - + uses: actions/checkout@v4 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' cache: 'pip' - + - name: Install dependencies run: | - make install-for-tests - + make install-for-tests + - name: Run dataset loading tests + env: + HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | - make dataset-load-test + if [ "${{ github.event_name }}" == "pull_request" ]; then + make dataset-load-test-pr BASE_BRANCH=${{ github.event.pull_request.base.ref }} + else + make dataset-load-test + fi \ No newline at end of file diff --git a/.github/workflows/dataset_loading_pr.yml b/.github/workflows/dataset_loading_pr.yml deleted file mode 100644 index c9de1d2300..0000000000 --- a/.github/workflows/dataset_loading_pr.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Datasets available on HuggingFace - PR - -on: - pull_request: - paths: - - "mteb/tasks/**.py" - -jobs: - run-pr-datasets-loading-check: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - - - name: Install dependencies - run: | - make install-for-tests - - - name: Run dataset loading tests - run: | - make dataset-load-test-pr BASE_BRANCH=${{ github.event.pull_request.base.ref }}