File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run Unit Tests
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' *' # Trigger on every branch
7
+ pull_request :
8
+ branches :
9
+ - ' *' # Trigger on pull requests for any branch
10
+
11
+ jobs :
12
+ unit_tests :
13
+ name : Run Unit Tests on Multiple Python Versions
14
+ runs-on : ubuntu-latest
15
+
16
+ strategy :
17
+ matrix :
18
+ python-version : [3.8, 3.9, 3.10, 3.11] # List of Python versions to test
19
+
20
+ steps :
21
+ - name : Checkout the repository
22
+ uses : actions/checkout@v2
23
+
24
+ - name : Set up Python
25
+ uses : actions/setup-python@v4
26
+ with :
27
+ python-version : ${{ matrix.python-version }} # Use Python version from the matrix
28
+ cache : ' pip'
29
+
30
+ - name : Install Hatchling (build system)
31
+ run : |
32
+ pip install hatchling
33
+
34
+ - name : Install dependencies
35
+ run : |
36
+ pip install .[dev] # This will install all dependencies including optional dev dependencies
37
+
38
+ - name : Run Unit Tests
39
+ run : |
40
+ python -m pytest tests/tests_unit # Adjust the path if necessary
41
+ env :
42
+ PYTHONPATH : . # Set PYTHONPATH to include your project root (if needed for imports)
You can’t perform that action at this time.
0 commit comments