File: testing_rag.yml

package info (click to toggle)
pytorch-geometric 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,172 kB
  • sloc: python: 144,911; sh: 247; cpp: 27; makefile: 18; javascript: 16
file content (52 lines) | stat: -rw-r--r-- 1,894 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Testing RAG

on:  # yamllint disable-line rule:truthy
  push:
    branches:
      - master
    paths:
      - 'torch_geometric/datasets/web_qsp_dataset.py'
      - 'torch_geometric/llm/**'
  pull_request:
    paths:
      - 'torch_geometric/datasets/web_qsp_dataset.py'
      - 'torch_geometric/llm/**'

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }}  # yamllint disable-line
  # Only cancel intermediate builds if on a PR:
  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
  rag_pytest:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v5

      - name: Setup packages
        uses: ./.github/actions/setup
        with:
          full_install: false

      - name: Install main package
        run: |
          uv pip install -e ".[test,rag]"

      - name: Run tests
        timeout-minutes: 10
        run: |
          # ignore mysterious segfault (139) if tests pass since this does not repro locally
          uv run --no-project bash -c 'pytest test/llm/models/test_g_retriever.py -m rag --cov --cov-report=xml -v; E=$?; [[ $E == 0 || $E == 139 ]] && exit 0 || exit $E'
          uv run --no-project bash -c 'pytest test/datasets/ -m rag --cov --cov-report=xml -v; E=$?; [[ $E == 0 || $E == 139 ]] && exit 0 || exit $E'
          uv run --no-project pytest test/llm/models/test_llm.py -m rag -v
          uv run --no-project pytest test/llm/models/test_sentence_transformer.py -m rag -v
          uv run --no-project pytest test/llm/utils/ -m rag -v
          uv run --no-project pytest test/llm/test_rag_loader.py -m rag -v
        shell: bash
        env:
          RAG_TEST: "1"
          TOKENIZERS_PARALLELISM: "false"
          OMP_NUM_THREADS: "1"
          MKL_NUM_THREADS: "1"