Skip to content

Commit 7cd99d8

Browse files
corrections
1 parent c4266b3 commit 7cd99d8

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/workflows/run_tests.yaml

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
name: Tests
1+
name: Python Tests
22

3-
# Trigger the workflow on pushes and pull requests to the 'master' branch
43
on:
54
push:
65
branches:
@@ -9,21 +8,17 @@ on:
98
branches:
109
- master
1110

12-
# Define the jobs
1311
jobs:
1412
test:
15-
# Run the job on the latest Ubuntu environment
1613
runs-on: ubuntu-latest
1714

18-
# Set up Python and install dependencies
1915
steps:
20-
# Check out the code from the repository
16+
# Use the latest version of actions
2117
- name: Check out code
22-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
2319

24-
# Set up Python environment
2520
- name: Set up Python
26-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v4
2722
with:
2823
python-version: "3.x" # Specify the version you want to use (e.g., 3.8, 3.9)
2924

@@ -37,12 +32,12 @@ jobs:
3732
- name: Run pytest
3833
run: |
3934
pip install pytest # Install pytest if not already in requirements
40-
pytest ./test # Specify the folder where the tests are located
35+
pytest ./test --junitxml=test-results.xml # Generate test results as XML
4136
42-
# Optionally, upload test results if you want to see them in the Actions tab
37+
# Upload test results
4338
- name: Upload test results
4439
if: always()
45-
uses: actions/upload-artifact@v3
40+
uses: actions/upload-artifact@v4
4641
with:
4742
name: test-results
48-
path: ./test-results.xml
43+
path: test-results.xml # Upload the test results XML file

0 commit comments

Comments
 (0)