|
22 | 22 | CACHED_BUILD_PATHS: | |
23 | 23 | ${{ github.workspace }}/dist-serverless |
24 | 24 | jobs: |
25 | | - test-ai-latest: |
26 | | - name: AI (latest) |
27 | | - timeout-minutes: 30 |
28 | | - runs-on: ${{ matrix.os }} |
29 | | - strategy: |
30 | | - fail-fast: false |
31 | | - matrix: |
32 | | - python-version: ["3.9","3.11","3.12"] |
33 | | - # python3.6 reached EOL and is no longer being supported on |
34 | | - # new versions of hosted runners on Github Actions |
35 | | - # ubuntu-20.04 is the last version that supported python3.6 |
36 | | - # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 |
37 | | - os: [ubuntu-22.04] |
38 | | - # Use Docker container only for Python 3.6 |
39 | | - container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }} |
40 | | - steps: |
41 | | - |
42 | | - - uses: actions/setup-python@v5 |
43 | | - if: ${{ matrix.python-version != '3.6' }} |
44 | | - with: |
45 | | - python-version: ${{ matrix.python-version }} |
46 | | - allow-prereleases: true |
47 | | - - name: Setup Test Env |
48 | | - run: | |
49 | | - pip install "coverage[toml]" tox |
50 | | - - name: Erase coverage |
51 | | - run: | |
52 | | - coverage erase |
53 | | - - name: Test anthropic latest |
54 | | - run: | |
55 | | - set -x # print commands that are executed |
56 | | - ./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest" |
57 | | - - name: Test cohere latest |
58 | | - run: | |
59 | | - set -x # print commands that are executed |
60 | | - ./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest" |
61 | | - - name: Test langchain latest |
62 | | - run: | |
63 | | - set -x # print commands that are executed |
64 | | - ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest" |
65 | | - - name: Test openai latest |
66 | | - run: | |
67 | | - set -x # print commands that are executed |
68 | | - ./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest" |
69 | | - - name: Test huggingface_hub latest |
70 | | - run: | |
71 | | - set -x # print commands that are executed |
72 | | - ./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest" |
73 | | - - name: Generate coverage XML (Python 3.6) |
74 | | - if: ${{ !cancelled() && matrix.python-version == '3.6' }} |
75 | | - run: | |
76 | | - export COVERAGE_RCFILE=.coveragerc36 |
77 | | - coverage combine .coverage-sentry-* |
78 | | - coverage xml --ignore-errors |
79 | | - - name: Generate coverage XML |
80 | | - if: ${{ !cancelled() && matrix.python-version != '3.6' }} |
81 | | - run: | |
82 | | - coverage combine .coverage-sentry-* |
83 | | - coverage xml |
84 | | - - name: Upload coverage to Codecov |
85 | | - if: ${{ !cancelled() }} |
86 | | - |
87 | | - with: |
88 | | - token: ${{ secrets.CODECOV_TOKEN }} |
89 | | - files: coverage.xml |
90 | | - # make sure no plugins alter our coverage reports |
91 | | - plugin: noop |
92 | | - verbose: true |
93 | | - - name: Upload test results to Codecov |
94 | | - if: ${{ !cancelled() }} |
95 | | - uses: codecov/test-results-action@v1 |
96 | | - with: |
97 | | - token: ${{ secrets.CODECOV_TOKEN }} |
98 | | - files: .junitxml |
99 | | - verbose: true |
100 | 25 | test-ai-pinned: |
101 | 26 | name: AI (pinned) |
102 | 27 | timeout-minutes: 30 |
|
0 commit comments