Skip to content

Commit 658855c

Browse files
committed
Add testing to CI
1 parent 5e54ecc commit 658855c

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ jobs:
1313
name: Build
1414
runs-on: ubuntu-latest
1515
steps:
16-
-
17-
name: Git checkout
16+
- name: Git checkout
1817
uses: actions/checkout@v2
19-
-
20-
name: Setup Miniconda
18+
19+
- name: Setup Miniconda
2120
uses: conda-incubator/setup-miniconda@v2
2221
with:
2322
miniconda-version: 'latest'
@@ -26,16 +25,41 @@ jobs:
2625
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
2726
auto-update-conda: true
2827
auto-activate-base: true
29-
-
30-
name: Set environment variables
28+
29+
- name: Set environment variables
3130
run: echo "CONDA_PREFIX=$CONDA" >> $GITHUB_ENV
32-
-
33-
name: Build dist
31+
32+
- name: Build dist
3433
run: ./linux_build.bash
35-
-
36-
name: Build and upload artifact
34+
35+
- name: Build and upload artifact
3736
uses: actions/upload-artifact@v3
3837
with:
3938
name: dist
4039
path: |
4140
dist
41+
42+
test:
43+
needs: build
44+
name: Test
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Git checkout
48+
uses: actions/checkout@v2
49+
50+
- name: Download artifact
51+
uses: actions/download-artifact@v3
52+
with:
53+
name: dist
54+
55+
- name: Install wheel
56+
run: pip install dist/*.whl
57+
58+
- name: Test installation
59+
run: python -c "import libcarna; print(libcarna.version)"
60+
61+
- name: Install dependencies
62+
run: pip install matplotlib-base
63+
64+
- name: Run tests
65+
run: python -m unittest test

misc/__init__.py.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
py_version = '@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@'
2-
version = '@LIBCARNA_VERSION@'
1+
version = '@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@'
2+
libcarna_version = '@LIBCARNA_VERSION@'
33

44

55
from ._py import *

0 commit comments

Comments
 (0)