File tree Expand file tree Collapse file tree 3 files changed +65
-36
lines changed
Expand file tree Collapse file tree 3 files changed +65
-36
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ pull_request :
9+
10+ jobs :
11+ tests :
12+ runs-on : ubuntu-latest
13+ env :
14+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ python-version :
19+ - " 3.8"
20+ - " 3.9"
21+ - " 3.10"
22+ - " 3.11"
23+ - " 3.12"
24+ - " 3.13"
25+ - " 3.14"
26+ - " pypy-3.9"
27+ steps :
28+ - name : Check out repository
29+ uses : actions/checkout@v4
30+
31+ - name : Set up Python ${{ matrix.python-version }}
32+ uses : actions/setup-python@v5
33+ with :
34+ python-version : ${{ matrix.python-version }}
35+
36+ - name : Install system dependencies
37+ run : |
38+ sudo apt-get update
39+ sudo apt-get install -y zip p7zip-full
40+
41+ - name : Install Python dependencies
42+ run : |
43+ python -m pip install --upgrade pip
44+ pip install . pytest pytest-cov
45+
46+ - name : Run tests
47+ run : pytest -vv --cov=jsonstore --cov-report=xml --junitxml=test-results.xml
48+
49+ - name : Upload coverage to Codecov
50+ if : always() && env.CODECOV_TOKEN != ''
51+ uses : codecov/codecov-action@v5
52+ with :
53+ token : ${{ env.CODECOV_TOKEN }}
54+ files : ./coverage.xml
55+ fail_ci_if_error : true
56+
57+ - name : Upload test results to Codecov
58+ if : always() && env.CODECOV_TOKEN != ''
59+ uses : codecov/codecov-action@v5
60+ with :
61+ token : ${{ env.CODECOV_TOKEN }}
62+ files : ./test-results.xml
63+ report_type : test_results
64+ fail_ci_if_error : true
Original file line number Diff line number Diff line change 2222 run : |
2323 python -m pip install --upgrade pip build
2424 python -m build
25- # the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
25+ # the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
2626 - name : Publish to PyPI
2727 uses : pypa/gh-action-pypi-publish@release/v1
28- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments