VenkateshRoshan commited on
Commit
7c1b1c6
·
1 Parent(s): 6afd1f4

test_codes updated

Browse files
Files changed (1) hide show
  1. .github/workflows/test.yml +38 -0
.github/workflows/test.yml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Run Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # Trigger the workflow on push to the main branch
7
+ pull_request:
8
+ branches:
9
+ - main # Trigger the workflow on pull requests targeting the main branch
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest # Run the job on the latest Ubuntu environment
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: '3.10' # Specify the Python version to use
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -r requirements.txt # Install dependencies from requirements.txt
28
+
29
+ - name: Run tests
30
+ run: |
31
+ pytest tests/test_module.py # Run tests with pytest
32
+
33
+ - name: Upload Test Results
34
+ if: success() || failure()
35
+ uses: actions/upload-artifact@v3
36
+ with:
37
+ name: test-results
38
+ path: test-results # Path to upload test results