Restricting Tests:
Looks like gh-actions commands from the yaml file are executed as if the shell were in the main directory of the repo.
Thus replace, for example:
pytest -s -v --cov=./ --cov-report=xml --cov=aurora
with, for example:
pytest -s -v tests/parkfield/test*py --cov=./ --cov-report=xml --cov=aurora
Running gh-actions locally
There appear to be packages for this, e.g. nektos but to go through most of the flow, you can execute something similar to the following:
conda create --name runner python=3.9
conda activate runner
mkdir runner
cd runner
3. conda install -c conda-forge pytest pytest-cov certifi">=2017.4.17" pandoc # might take a while
git clone git@kkappler-github:simpeg/aurora.git
cd aurora
pip install -e .
pip install -r requirements-dev.txt
pip install git+https://github.com/kujaku11/mt_metadata.git
pip install git+https://github.com/kujaku11/mth5.git@patch_129
Comparing branches
After pulling locally, run
git difftool -d branch_name
to compare your current branch against "branch_name"
Restricting Tests: Looks like gh-actions commands from the yaml file are executed as if the shell were in the main directory of the repo.
Thus replace, for example: pytest -s -v --cov=./ --cov-report=xml --cov=aurora with, for example: pytest -s -v tests/parkfield/test*py --cov=./ --cov-report=xml --cov=aurora
Running gh-actions locally
git difftool -d branch_name
to compare your current branch against "branch_name"