-
Notifications
You must be signed in to change notification settings - Fork 20
Enable Continuous Integration Testing #135
Copy link
Copy link
Closed
Milestone
Description
The goal is to develop a set of scripts to verify performance and execution of all facets of the hsp2 install upon making changes, so that we can easily see if anything obvious has broken as we improve things. Thus far, testing is being setup on the forked project at https://github.com/HARPgroup/HSPsquared/, and once we arrive at a working setup we will share it back here.
Tasks
- Test setup CI on forked repo with install of target environment and packages
- Create simple
pytestscript for proof of concept - Create
hsp2-install-test.ymlfile to house base testing (overenvironment.ymlconfig)- Develop
pipinstaller test action https://github.com/HARPgroup/HSPsquared/blob/testx/.github/workflows/hsp2-pip-install-test.yml
- Develop
- Create
hsp2-install-test-dev.ymlfile to house base testing (overenvironment_dev.ymlconfig)- Develop
pipinstaller test action https://github.com/HARPgroup/HSPsquared/blob/testx/.github/workflows/hsp2-pip-install-test-dev.yml - Develop
condainstaller test action (see Conda below)
- Develop
- Enable running test10 in
hsp2-install-test.yml- Create the h5 and import the UCI
- Create
pytest_test10.pyto do summaries assert that h5 file is created
- Lay out basic parameters for cost-efficient testing (per https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions and https://docs.github.com/en/billing/managing-billing-for-github-packages/about-billing-for-github-packages)
- Create pull request to
developTesting framework base deployment #142
Conda
- github VMs supposedly have an environment variable
CONDAset up, so:- install with
$CONDA/bin/conda env update --file environment.yml --name base - see: https://autobencoder.com/2020-08-24-conda-actions/
- install with
Notes
- Based loosely on https://coderefinery.github.io/testing/continuous-integration/, and then during testing I have updated to reflect some suggestions/variations from https://docs.github.com/en/enterprise-server@3.11/actions/automating-builds-and-tests/building-and-testing-python
- Also:
- On windows to test pytest with pip, run
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --default-timeout=1000 pytest pytest-cov
- On windows to test pytest with pip, run
- Also:
- Base enabling complete, now working through error when
pytestruns the filetests/convert/conversion_test.py.pytesthas automatic discovery (if run without explicit arguments) https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html#test-discovery
Start at Actions page:
Disabling a Test
Enabling a Test
Cost Factors for Testing
- Basic accounts get 2,000 testing minutes per month free from github (paid accounts get 3,000)
- Current pip/Linux test path takes ~4.1 mins to execute
- Uses test10
- Install/dependencies 22 secs
- Install
hsp237 secs - Import+Run
hsp2~3.0 mins
- Current conda/Linux test path takes N/A to execute
- Uses test10
- Install/dependencies 1.3 mins
- Install
hsp21 secs (this seems rather short, unless the conda install took care of all dependencies) - Import+Run
hsp2failed
- Loading estimates:
- Note: test triggering is by branch, and is off by default, i.e., you have to specify a branch as a target of a test.
- Tests can be triggered on PRs or pushs (commits that get pushed to github from someones local machine)
- Last month there were 7 pull requests on
develop, and 27 commits ondevelop-specact - On our fork repo we 95 commits, more than 70 of which were tiny incremental commits done to test the testing framework, so, a reasonable max monthly estimate might be 50 commits per month.
- If testing were enabled for:
- all PRs to
developandmaster, - all commits to the
develop-specact: - all testing was performed on respec (which is unlikely),
- 740 minutes / month:
- ~ 90 test events per month
- 4 mins per test * 2 tests (normal and dev install)
- ~740 minutes / month
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


