@@ -10,39 +10,41 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
strategy :
12
12
matrix :
13
- python : ["3.12 ", "3.11 ", "3.10", "3.9 ", "3.8 "]
13
+ python : ["3.8 ", "3.9 ", "3.10", "3.11 ", "3.12 "]
14
14
steps :
15
15
- uses : actions/checkout@v4
16
- - name : Set up Python
16
+ - name : Setup Python
17
17
uses : actions/setup-python@v5
18
18
with :
19
19
python-version : ${{ matrix.python }}
20
20
- name : Install dependencies
21
- run : pip install tox
22
- - name : Run unit tests
23
- run : tox -e test-unit -- --cov-report=term-missing --cov --cov-fail-under=75
21
+ run : |
22
+ python -m pip install tox
23
+ - name : Run tests (smoke, sanity, and regression)
24
+ run : |
25
+ python -m tox -e test-unit
24
26
25
27
integration-tests :
26
28
runs-on : ubuntu-latest
27
29
strategy :
28
30
matrix :
29
- python : ["3.12 ", "3.11 ", "3.10", "3.9 ", "3.8 "]
31
+ python : ["3.8 ", "3.9 ", "3.10", "3.11 ", "3.12 "]
30
32
steps :
31
33
- uses : actions/checkout@v4
32
- - name : Set up Python
34
+ - name : Setup Python
33
35
uses : actions/setup-python@v5
34
36
with :
35
37
python-version : ${{ matrix.python }}
36
38
- name : Install dependencies
37
39
run : pip install tox
38
- - name : Run integration tests
40
+ - name : Run tests (smoke and sanity)
39
41
run : tox -e test-integration -- -m "smoke or sanity"
40
42
41
43
e2e-tests :
42
44
runs-on : ubuntu-latest
43
45
strategy :
44
46
matrix :
45
- python : ["3.12 ", "3.11 ", "3.10", "3.9 ", "3.8 "]
47
+ python : ["3.8 ", "3.9 ", "3.10", "3.11 ", "3.12 "]
46
48
steps :
47
49
- uses : actions/checkout@v4
48
50
- name : Set up Python
@@ -51,23 +53,48 @@ jobs:
51
53
python-version : ${{ matrix.python }}
52
54
- name : Install dependencies
53
55
run : pip install tox
54
- - name : Run e2e tests
56
+ - name : Run tests (smoke)
55
57
run : tox -e test-e2e -- -m smoke
56
58
59
+ check-publish :
60
+ runs-on : ubuntu-latest
61
+ needs : [ unit-tests, integration-tests, e2e-tests ]
62
+ steps :
63
+ - uses : actions/checkout@v4
64
+ - name : Check changes (last nightly tag)
65
+ id : check_changes
66
+ run : |
67
+ git fetch origin
68
+ LAST_NIGHTLY_TAG=$(git describe --tags --match "nightly-*" --abbrev=0)
69
+ git diff --exit-code $LAST_NIGHTLY_TAG -- . || echo "changes"
70
+ - name : Set env
71
+ id : set_output
72
+ run : |
73
+ echo "::set-output name=changes_detected::$(git diff --exit-code $LAST_NIGHTLY_TAG -- . || echo 'true')"
74
+
57
75
publish :
58
- needs : [unit-tests, integration-tests, e2e-tests]
59
76
runs-on : ubuntu-latest
60
- env :
61
- GUIDELLM_BUILD_TYPE : nightly
62
- GUIDELLM_BUILD_NUMBER : ${{ github.event.pull_request.number || github.run_number }}
77
+ needs : [ check-publish ]
78
+ uses : neuralmagic/nm-actions/actions/python-tox-release@main
79
+ with :
80
+ publish_pypi : true
81
+ publish_nm_pypi : false
82
+ build_type : nightly
83
+ secrets :
84
+ GCP_PROJECT : ${{ secrets.GCP_PROJECT }}
85
+ GCP_WORKLOAD_IDENTITY_PROVIDER : ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
86
+ GCP_NM_PYPI_SA : ${{ secrets.GCP_NM_PYPI_SA }}
87
+ NM_PYPI_SA : ${{ secrets.NM_PYPI_SA }}
88
+ PYPI_PUBLIC_USER : ${{ secrets.PYPI_PUBLIC_USER }}
89
+ PYPI_PUBLIC_AUTH : ${{ secrets.PYPI_PUBLIC_AUTH }}
90
+
91
+ tag :
92
+ runs-on : ubuntu-latest
93
+ needs : [ publish ]
94
+ if : ${{ needs.check-publish.outputs.changes_detected == 'true' }}
63
95
steps :
64
96
- uses : actions/checkout@v4
65
- - name : Set up Python
66
- uses : actions/setup-python@v5
67
- with :
68
- python-version : " 3.8"
69
- - name : Build and Publish a Candidate Release
70
- uses : neuralmagic/nm-actions/actions/publish_pypi@main
71
- with :
72
- publish_pypi : true
73
- publish_pypi_internal : true
97
+ - name : Tag nightly
98
+ run : |
99
+ git tag nightly-$(date +'%Y%m%d')
100
+ git push origin --tags
0 commit comments