Skip to content

Commit 0bb6db5

Browse files
committed
Stage current state
1 parent 6ca56d3 commit 0bb6db5

File tree

9 files changed

+174
-106
lines changed

9 files changed

+174
-106
lines changed

.coveragerc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[paths]
2+
source =
3+
src
4+
*/site-packages
5+
6+
[run]
7+
branch = true
8+
parallel = true
9+
source =
10+
guidellm
11+
tests/unit
12+
13+
[report]
14+
show_missing = true
15+
precision = 2

.github/workflows/development.yml

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,77 @@
1-
name: Development
1+
---
2+
name: Development Branch Workflow
23

34
on:
4-
push:
5-
branches:
6-
- "main"
7-
85
pull_request:
9-
branches:
10-
- "**"
6+
branches: ["**"]
117

128
jobs:
9+
quality-checks:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python: ["3.9", "3.12"]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python }}
20+
- name: Install dependencies
21+
run: pip install tox
22+
- name: Run checks (quality, types, and pre-commit)
23+
run: |
24+
tox -e quality
25+
tox -e types
26+
pre-commit run --all-files
27+
1328
unit-tests:
1429
runs-on: ubuntu-latest
1530
strategy:
1631
matrix:
17-
python:
18-
- "3.12"
19-
- "3.8"
32+
python: ["3.9", "3.12"]
2033
steps:
2134
- uses: actions/checkout@v4
22-
- name: Set up Python
35+
- name: Setup Python
2336
uses: actions/setup-python@v5
2437
with:
2538
python-version: ${{ matrix.python }}
2639
- name: Install dependencies
2740
run: |
2841
python -m pip install tox
29-
- name: Run unit tests
42+
- name: Run tests (smoke and sanity)
3043
run: |
3144
python -m tox -e test-unit -- -m "smoke or sanity"
3245
3346
integration-tests:
3447
runs-on: ubuntu-latest
3548
strategy:
3649
matrix:
37-
python: ["3.12", "3.8"]
50+
python: ["3.9", "3.12"]
3851
steps:
3952
- uses: actions/checkout@v4
40-
- name: Set up Python
53+
- name: Setup Python
4154
uses: actions/setup-python@v5
4255
with:
4356
python-version: ${{ matrix.python }}
4457
- name: Install dependencies
45-
run: python -m pip install tox
46-
- name: Run integration tests
47-
run: python -m tox -e test-integration -- -m smoke
58+
run: |
59+
python -m pip install tox
60+
- name: Run tests (smoke)
61+
run: |
62+
python -m tox -e test-integration -- -m smoke
4863
4964
publish:
50-
if: github.event_name == 'pull_request' || github.event_name == 'push' && github.ref == 'refs/heads/main'
51-
name: Build & Publish the distribution
52-
needs: [unit-tests, integration-tests, e2e-tests]
5365
runs-on: ubuntu-latest
54-
steps:
55-
- uses: actions/checkout@v4
56-
- name: Set up Python
57-
uses: actions/setup-python@v5
58-
with:
59-
python-version: "3.8"
60-
- name: Build and Publish Candidate Release
61-
uses: neuralmagic/nm-actions/actions/publish_pypi@main
62-
with:
63-
publish_pypi: false
64-
publish_pypi_internal: true
65-
build_type: "dev"
66+
uses: neuralmagic/nm-actions/actions/python-tox-release@main
67+
with:
68+
publish_pypi: false
69+
publish_nm_pypi: true
70+
build_type: dev
71+
secrets:
72+
GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
73+
GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
74+
GCP_NM_PYPI_SA: ${{ secrets.GCP_NM_PYPI_SA }}
75+
NM_PYPI_SA: ${{ secrets.NM_PYPI_SA }}
76+
PYPI_PUBLIC_USER: ${{ secrets.PYPI_PUBLIC_USER }}
77+
PYPI_PUBLIC_AUTH: ${{ secrets.PYPI_PUBLIC_AUTH }}

.github/workflows/main.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
name: Main Branch Workflow
3+
4+
on:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
quality-checks:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python: [ "3.9", "3.12" ]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python }}
20+
- name: Install dependencies
21+
run: pip install tox
22+
- name: Run checks (quality, types, and pre-commit)
23+
run: |
24+
tox -e quality
25+
tox -e types
26+
pre-commit run --all-files
27+
28+
unit-tests:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
matrix:
32+
python: ["3.9", "3.12"]
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Setup Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python }}
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install tox
42+
- name: Run tests (smoke and sanity)
43+
run: |
44+
python -m tox -e test-unit -- -m "smoke or sanity"
45+
46+
integration-tests:
47+
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
python: ["3.9", "3.12"]
51+
steps:
52+
- uses: actions/checkout@v4
53+
- name: Setup Python
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: ${{ matrix.python }}
57+
- name: Install dependencies
58+
run: python -m pip install tox
59+
- name: Run tests (smoke)
60+
run: python -m tox -e test-integration -- -m smoke
61+
62+
publish:
63+
runs-on: ubuntu-latest
64+
uses: neuralmagic/nm-actions/actions/python-tox-release@main
65+
with:
66+
publish_pypi: false
67+
publish_nm_pypi: true
68+
build_type: dev
69+
secrets:
70+
GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
71+
GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
72+
GCP_NM_PYPI_SA: ${{ secrets.GCP_NM_PYPI_SA }}
73+
NM_PYPI_SA: ${{ secrets.NM_PYPI_SA }}
74+
PYPI_PUBLIC_USER: ${{ secrets.PYPI_PUBLIC_USER }}
75+
PYPI_PUBLIC_AUTH: ${{ secrets.PYPI_PUBLIC_AUTH }}

.github/workflows/nightly.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1+
---
12
name: Nightly
23

34
on:
45
schedule:
5-
- cron: "0 0 * * *"
6+
- cron: 0 0 * * *
67

78
jobs:
89
unit-tests:
910
runs-on: ubuntu-latest
1011
strategy:
1112
matrix:
12-
python:
13-
- "3.12"
14-
- "3.11"
15-
- "3.10"
16-
- "3.9"
17-
- "3.8"
13+
python: ["3.12", "3.11", "3.10", "3.9", "3.8"]
1814
steps:
1915
- uses: actions/checkout@v4
2016
- name: Set up Python
@@ -30,12 +26,7 @@ jobs:
3026
runs-on: ubuntu-latest
3127
strategy:
3228
matrix:
33-
python:
34-
- "3.12"
35-
- "3.11"
36-
- "3.10"
37-
- "3.9"
38-
- "3.8"
29+
python: ["3.12", "3.11", "3.10", "3.9", "3.8"]
3930
steps:
4031
- uses: actions/checkout@v4
4132
- name: Set up Python
@@ -51,12 +42,7 @@ jobs:
5142
runs-on: ubuntu-latest
5243
strategy:
5344
matrix:
54-
python:
55-
- "3.12"
56-
- "3.11"
57-
- "3.10"
58-
- "3.9"
59-
- "3.8"
45+
python: ["3.12", "3.11", "3.10", "3.9", "3.8"]
6046
steps:
6147
- uses: actions/checkout@v4
6248
- name: Set up Python
@@ -82,4 +68,4 @@ jobs:
8268
with:
8369
publish_pypi: true
8470
publish_pypi_internal: true
85-
build_type: "nightly"
71+
build_type: nightly

.github/workflows/quality.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1+
---
12
name: Quality
23

34
on:
45
push:
5-
branches:
6-
- main
6+
branches: [main]
77
pull_request:
8-
branches:
9-
- "**"
8+
branches: ["**"]
109

1110
jobs:
1211
quality-check:
1312
runs-on: ubuntu-latest
1413
strategy:
1514
matrix:
16-
python:
17-
- "3.12"
18-
- "3.8"
15+
python: ["3.12", "3.8"]
1916
steps:
2017
- uses: actions/checkout@v4
2118
- name: Set up Python
@@ -31,9 +28,7 @@ jobs:
3128
runs-on: ubuntu-latest
3229
strategy:
3330
matrix:
34-
python:
35-
- "3.12"
36-
- "3.8"
31+
python: ["3.12", "3.8"]
3732
steps:
3833
- uses: actions/checkout@v4
3934
- name: Set up Python

.github/workflows/release.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1+
---
12
name: Release
23

34
on:
45
push:
5-
tags:
6-
- v*
7-
branches:
8-
- release/**
6+
tags: [v*]
7+
branches: [release/**]
98

109
jobs:
1110
unit-tests:
1211
runs-on: ubuntu-latest
1312
strategy:
1413
matrix:
15-
python:
16-
- "3.12"
17-
- "3.11"
18-
- "3.10"
19-
- "3.9"
20-
- "3.8"
14+
python: ["3.12", "3.11", "3.10", "3.9", "3.8"]
2115
steps:
2216
- uses: actions/checkout@v4
2317
- name: Set up Python
@@ -33,12 +27,7 @@ jobs:
3327
runs-on: ubuntu-latest
3428
strategy:
3529
matrix:
36-
python:
37-
- "3.12"
38-
- "3.11"
39-
- "3.10"
40-
- "3.9"
41-
- "3.8"
30+
python: ["3.12", "3.11", "3.10", "3.9", "3.8"]
4231
steps:
4332
- uses: actions/checkout@v4
4433
- name: Set up Python
@@ -54,12 +43,7 @@ jobs:
5443
runs-on: ubuntu-latest
5544
strategy:
5645
matrix:
57-
python:
58-
- "3.12"
59-
- "3.11"
60-
- "3.10"
61-
- "3.9"
62-
- "3.8"
46+
python: ["3.12", "3.11", "3.10", "3.9", "3.8"]
6347
steps:
6448
- uses: actions/checkout@v4
6549
- name: Set up Python
@@ -86,4 +70,4 @@ jobs:
8670
with:
8771
publish_pypi: true
8872
publish_pypi_internal: true
89-
build_type: "release"
73+
build_type: release

0 commit comments

Comments
 (0)