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