File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test sysmlv2-python-client
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main, develop ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Python
18+ id : setup-python
19+ uses : actions/setup-python@v4
20+ with :
21+ python-version : ' 3.11'
22+
23+ - name : Cache pip dependencies
24+ uses : actions/cache@v3
25+ with :
26+ path : ~/.cache/pip
27+ key : ${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
28+ restore-keys : |
29+ ${{ runner.os }}-pip-
30+
31+ - name : Install dependencies
32+ run : |
33+ python -m pip install --upgrade pip
34+ pip install -e .
35+ pip install pytest pytest-cov requests-mock
36+
37+ - name : Run tests with coverage
38+ run : |
39+ mkdir -p test-results
40+ pytest -v --tb=short \
41+ --junitxml=test-results/results.xml \
42+ --cov=src/sysmlv2_client \
43+ --cov-report=xml:test-results/coverage.xml \
44+ --cov-report=html:test-results/htmlcov
45+
46+ - name : Upload test results
47+ uses : actions/upload-artifact@v4
48+ if : always()
49+ with :
50+ name : test-results-sysmlv2-python-client
51+ path : test-results/
You can’t perform that action at this time.
0 commit comments