Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests once using coverage on ubuntu-latest with Python 3.9 #1794

Merged

Conversation

Saransh-cpp
Copy link
Member

@Saransh-cpp Saransh-cpp commented Nov 9, 2021

Description

  • Removed the code for "slow books"
  • Speed up the CI by running unit tests only once (using coverage) on ubuntu-latest with Python 3.9
  • Run integration and unit tests separately on ubuntu-latest

Speeds up the CI by 15-30 mins!

Fixes # (issue)

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@Saransh-cpp Saransh-cpp marked this pull request as draft November 9, 2021 20:35
@@ -88,7 +92,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: tox -e examples

- name: Install and run coverage
- name: Run unit tests for GNU/Linux with Python 3.9 and generate coverage report
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to line 78? Better to check the unit tests before integration tests and examples

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #1794 (0e08601) into develop (337e602) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1794   +/-   ##
========================================
  Coverage    99.24%   99.24%           
========================================
  Files          343      343           
  Lines        18983    18983           
========================================
  Hits         18840    18840           
  Misses         143      143           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 337e602...0e08601. Read the comment docs.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good

run: python -m tox -e quick

- name: Run unit tests for GNU/Linux with Python 3.9 and generate coverage report
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we need the if success here

@Saransh-cpp Saransh-cpp marked this pull request as ready for review November 10, 2021 18:11
@valentinsulzer valentinsulzer merged commit 5fad596 into pybamm-team:develop Nov 10, 2021
@Saransh-cpp Saransh-cpp deleted the run-tests-once-using-coverage branch November 11, 2021 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants