Skip to content

Commit 9e24c47

Browse files
committed
Add tests
1 parent a397fa9 commit 9e24c47

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

.github/workflows/ci_cd.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,41 @@ jobs:
104104
name: dist
105105
path: dist
106106

107+
test-build-package:
108+
name: Test build on ${{ matrix.os }}
109+
runs-on: ${{ matrix.os }}
110+
needs: build-package
111+
strategy:
112+
matrix:
113+
os:
114+
- macos-latest
115+
- ubuntu-latest
116+
- windows-latest
117+
steps:
118+
- name: Check out repository
119+
uses: actions/checkout@v4
120+
121+
- name: Set up Python
122+
uses: actions/setup-python@v5
123+
with:
124+
python-version: '3.11'
125+
126+
- name: Get package artifacts
127+
uses: actions/download-artifact@v4
128+
with:
129+
name: dist
130+
path: dist
131+
132+
- name: Run tests
133+
shell: bash
134+
run: |
135+
rm -rf nettacker
136+
python -m pip install dist/*.whl
137+
nettacker --version
138+
python -m pip uninstall -y nettacker
139+
python -m pip install dist/*.tar.gz
140+
nettacker --version
141+
107142
test-docker-image:
108143
name: Test Docker image
109144
needs:
@@ -231,7 +266,7 @@ jobs:
231266
github.ref_name == 'master'
232267
environment: dev
233268
needs:
234-
- build-package
269+
- test-build-package
235270
permissions:
236271
contents: read
237272
id-token: write
@@ -257,7 +292,7 @@ jobs:
257292
startsWith(github.event.ref, 'refs/tags/v')
258293
environment: release
259294
needs:
260-
- build-package
295+
- test-build-package
261296
permissions:
262297
contents: read
263298
id-token: write

0 commit comments

Comments
 (0)