diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index 97c37e8c28..52a98aa515 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -31,7 +31,7 @@ jobs: pre-commit run -a run_unit_integration_and_coverage_tests: - needs: style +# needs: style runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/noxfile.py b/noxfile.py index 7237786ef6..68b3c745ac 100644 --- a/noxfile.py +++ b/noxfile.py @@ -69,6 +69,9 @@ def run_coverage(session): set_environment_variables(PYBAMM_ENV, session=session) session.install("setuptools", silent=False) session.install("coverage", silent=False) + # Adding a comment + if "CI" in os.environ: + session.install("pytest-github-actions-annotate-failures") session.install("-e", ".[all,dev,jax]", silent=False) session.run("pytest", "--cov=pybamm", "--cov-report=xml", "tests/unit") @@ -78,6 +81,8 @@ def run_integration(session): """Run the integration tests.""" set_environment_variables(PYBAMM_ENV, session=session) session.install("setuptools", silent=False) + if "CI" in os.environ and sys.version_info[:2] == (3, 12) and sys.platform == "linux": + session.install("pytest-github-actions-annotate-failures") session.install("-e", ".[all,dev,jax]", silent=False) session.run("python", "run-tests.py", "--integration") diff --git a/tests/unit/test_mockfail.py b/tests/unit/test_mockfail.py new file mode 100644 index 0000000000..ede6a440f5 --- /dev/null +++ b/tests/unit/test_mockfail.py @@ -0,0 +1,2 @@ +def test_add(): + assert 1 + 1 == 0 \ No newline at end of file