Skip to content

Commit 1dba77b

Browse files
authored
Merge pull request #105 from qutech/ci/codecov-test-analytics
Add codecov test analytics
2 parents 26c755c + ce1ae3d commit 1dba77b

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,23 @@ jobs:
3131
3232
- name: Test with pytest
3333
run: |
34-
python -m hatch run tests:run
34+
python -m pytest
3535
3636
- name: Upload coverage to Codecov
37-
uses: codecov/codecov-action@v4
37+
uses: codecov/codecov-action@v5
3838
with:
39-
file: ./coverage.xml
4039
name: ${{ matrix.python }} - ${{ matrix.install_extras }}
4140
env_vars: OS,PYTHON
42-
fail_ci_if_error: true
41+
fail_ci_if_error: false
4342
token: ${{ secrets.CODECOV_TOKEN }} # required
4443
verbose: true
44+
- name: Upload test results to Codecov
45+
if: ${{ !cancelled() }}
46+
uses: codecov/test-results-action@v1
47+
with:
48+
name: ${{ matrix.python }} - ${{ matrix.install_extras }}
49+
token: ${{ secrets.CODECOV_TOKEN }}
50+
4551

4652
release:
4753
name: Publish to PyPi

pyproject.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ name = "filter_functions"
77
description = "Package for efficient calculation of generalized filter functions"
88
readme = "README.md"
99
requires_python = ">= 3.9"
10-
license = {file = "LICENSE"}
10+
license = { file = "LICENSE" }
1111
dynamic = ["version"]
1212
authors = [
13-
{name = "Tobias Hangleiter", email = "tobias.hangleiter@rwth-aachen.de"},
14-
{name = "Quantum Technology Group, RWTH Aachen University"},
13+
{ name = "Tobias Hangleiter", email = "tobias.hangleiter@rwth-aachen.de" },
14+
{ name = "Quantum Technology Group, RWTH Aachen University" },
1515
]
1616
classifiers = [
1717
"Programming Language :: Python :: 3 :: Only",
@@ -70,11 +70,6 @@ Homepage = "https://www.quantuminfo.physik.rwth-aachen.de/cms/Quantuminfo/Forsch
7070
[tool.hatch.version]
7171
path = "filter_functions/__init__.py"
7272

73-
[tool.hatch.envs.tests]
74-
features = ["tests"]
75-
[tool.hatch.envs.tests.scripts]
76-
run = ["python -m pytest"]
77-
7873
[tool.hatch.envs.doc]
7974
features = [
8075
"doc",
@@ -86,7 +81,7 @@ build = [
8681

8782
[tool.pytest.ini_options]
8883
minversion = "4.6"
89-
addopts = "-ra --verbose --cov=filter_functions --cov-report=xml"
84+
addopts = "-ra --verbose --cov=filter_functions --cov-report=xml --junitxml=junit.xml -o junit_family=legacy"
9085
testpaths = [
9186
"tests"
9287
]

tests/test_plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
reason='Skipping plotting tests for build without matplotlib')
4040
if plotting is not None:
4141
import matplotlib.pyplot as plt
42-
from matplotlib import cycler
42+
from cycler import cycler
4343

4444
simple_pulse = testutil.rand_pulse_sequence(2, 1, 1, 1, btype='Pauli')
4545
complicated_pulse = testutil.rand_pulse_sequence(2, 100, 3, 3)

0 commit comments

Comments
 (0)