1
name: Continuous Integration
25
OPENLLM_DO_NOT_TRACK: True
28
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
31
shell: bash --noprofile --norc -exo pipefail {0}
34
runs-on: ${{ matrix.os }}
35
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push'|| github.event_name == 'workflow_call' }}
39
os: [ubuntu-latest, macos-latest, windows-latest]
40
python-version: ['3.8', '3.11']
42
- os: 'windows-latest'
43
name: tests (${{ matrix.python-version }}.${{ matrix.os }})
45
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
48
ref: ${{ github.event.pull_request.head.sha }}
49
- uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1
51
bentoml-version: 'main'
52
python-version: ${{ matrix.python-version }}
54
run: hatch run tests:python
55
- name: Disambiguate coverage filename
56
run: mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}"
57
- name: Upload coverage data
58
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3
64
runs-on: ubuntu-latest
68
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
71
ref: ${{ github.event.pull_request.head.sha }}
72
- uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1
74
bentoml-version: 'main'
75
python-version-file: .python-version-default
76
- name: Download coverage data
77
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3
80
- name: Combine coverage data
81
run: hatch run coverage:combine
82
- name: Export coverage reports
84
hatch run coverage:report-xml openllm-python
85
hatch run coverage:report-uncovered-html openllm-python
86
- name: Upload uncovered HTML report
87
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3
89
name: uncovered-html-report
91
- name: Generate coverage summary
92
run: hatch run coverage:generate-summary
93
- name: Write coverage summary report
94
if: github.event_name == 'pull_request'
95
run: hatch run coverage:write-summary-report
96
- name: Update coverage pull request comment
97
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
98
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # ratchet:marocchino/sticky-pull-request-comment@v2
100
path: coverage-report.md
102
name: Check for CLI responsiveness
103
runs-on: ubuntu-latest
105
HYPERFINE_VERSION: '1.12.0'
107
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
110
- name: Install hyperfine
112
wget https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/hyperfine_${HYPERFINE_VERSION}_amd64.deb
113
sudo dpkg -i hyperfine_${HYPERFINE_VERSION}_amd64.deb
114
- uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1
116
bentoml-version: 'main'
117
python-version-file: .python-version-default
121
run: hyperfine -m 100 --warmup 10 openllm
123
name: Running dry-run tests for brew
124
runs-on: macos-latest
126
- name: Install tap and dry-run
128
brew tap bentoml/openllm https://github.com/bentoml/openllm
131
openllm models --show-available
132
evergreen: # https://github.com/marketplace/actions/alls-green#why
138
runs-on: ubuntu-latest
140
- name: Decide whether the needed jobs succeeded or failed
141
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # ratchet:re-actors/alls-green@release/v1
143
jobs: ${{ toJSON(needs) }}
145
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
146
cancel-in-progress: true