Skip to content

Commit 45d4465

Browse files
committed
Add CI tests workflow
1 parent af3908c commit 45d4465

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
pytest:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12"]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set Up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: pip
28+
29+
- name: Upgrade pip
30+
run: python -m pip install --upgrade pip
31+
32+
- name: Ensure Clean Environment (No Preinstalled hypergraphx)
33+
run: |
34+
python -m pip uninstall -y hypergraphx || true
35+
if python -m pip show hypergraphx >/dev/null 2>&1; then
36+
echo "hypergraphx is unexpectedly installed before test setup."
37+
python -m pip show hypergraphx
38+
exit 1
39+
fi
40+
41+
- name: Install
42+
run: |
43+
python -m pip install -e ".[dev]"
44+
python -m pip install matplotlib
45+
46+
- name: Pytest
47+
run: pytest
48+

0 commit comments

Comments
 (0)