|
8 | 8 | jobs: |
9 | 9 | test: |
10 | 10 | runs-on: ubuntu-latest |
11 | | - env: |
12 | | - # Expose once at job level because forked PRs can't use secrets.* in `if:` conditions. |
13 | | - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
14 | | - |
15 | 11 | steps: |
16 | 12 | #---------------------------------------------- |
17 | 13 | # check-out repo and set-up python |
@@ -58,43 +54,20 @@ jobs: |
58 | 54 | #---------------------------------------------- |
59 | 55 | # run test suite |
60 | 56 | #---------------------------------------------- |
61 | | - |
62 | | - # Run tests (with secrets): full suite |
63 | 57 | - name: Run tests |
64 | | - if: ${{ env.OPENAI_API_KEY != '' }} |
65 | | - run: | |
66 | | - poetry run pytest -vv -rA --maxfail=1 --capture=tee-sys \ |
67 | | - tests/test_core/ \ |
68 | | - --ignore=tests/test_core/test_synthesizer/ \ |
69 | | - --ignore=tests/test_core/test_datasets/ |
70 | | -
|
71 | | - # Run tests (no secrets): skip e2e that require API keys |
72 | | - - name: Run tests (no secrets) |
73 | | - if: ${{ env.OPENAI_API_KEY == '' }} |
| 58 | + env: |
| 59 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
74 | 60 | run: | |
75 | | - poetry run pytest -vv -rA --maxfail=1 --capture=tee-sys \ |
76 | | - tests/test_core/ \ |
77 | | - --ignore=tests/test_core/test_synthesizer/ \ |
78 | | - --ignore=tests/test_core/test_datasets/ \ |
79 | | - --ignore=tests/test_core/test_evaluation/test_end_to_end/test_configs.py \ |
80 | | - --ignore=tests/test_core/test_tracing/test_dataset_iterator.py |
| 61 | + poetry run pytest tests/test_core/ --ignore=tests/test_core/test_synthesizer/ --ignore=tests/test_core/test_datasets/ |
81 | 62 |
|
82 | 63 | #---------------------------------------------- |
83 | 64 | # install dev dependencies (including chromadb) and run synthesizer tests |
84 | 65 | #---------------------------------------------- |
85 | 66 | - name: Install dev dependencies |
86 | 67 | run: poetry install --no-interaction --with dev |
87 | 68 |
|
88 | | - # Dev tests (with secrets) |
89 | | - - name: Run dev tests |
90 | | - if: ${{ env.OPENAI_API_KEY != '' }} |
91 | | - run: | |
92 | | - poetry run pytest -vv -rA --maxfail=1 --capture=tee-sys -o faulthandler_timeout=300 \ |
93 | | - tests/test_core/test_synthesizer/ tests/test_core/test_datasets/ |
94 | | -
|
95 | | - # Dev tests (no secrets) |
96 | | - - name: Run dev tests (no secrets) |
97 | | - if: ${{ env.OPENAI_API_KEY == '' }} |
| 69 | + - name: Run core tests with dev dependencies |
| 70 | + env: |
| 71 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
98 | 72 | run: | |
99 | | - poetry run pytest -vv -rA --maxfail=1 --capture=tee-sys -o faulthandler_timeout=300 \ |
100 | | - tests/test_core/test_datasets/ |
| 73 | + poetry run pytest tests/test_core/test_synthesizer/ tests/test_core/test_datasets/ |
0 commit comments