add test coverage #824
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: External Tests | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
pyuvsim: | |
name: pyuvsim | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# Adding -l {0} helps ensure conda can be found properly. | |
shell: bash -l {0} | |
env: | |
ENV_NAME: pyuvsim_tests | |
PYTHON: "3.10" | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- name: clone pyuvsim | |
run: | | |
cd ../ | |
git clone https://github.com/RadioAstronomySoftwareGroup/pyuvsim.git | |
cd pyradiosky | |
- name: Setup Minimamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
use-mamba: true | |
python-version: ${{ env.PYTHON }} | |
environment-file: ../pyuvsim/ci/${{ env.ENV_NAME }}.yaml | |
activate-environment: ${{ env.ENV_NAME }} | |
- name: Conda Info | |
run: | | |
conda info -a | |
conda list | |
PYVER=`python -c "import sys; print('{:d}.{:d}'.format(sys.version_info.major, sys.version_info.minor))"` | |
if [[ $PYVER != ${{ env.PYTHON }} ]]; then | |
exit 1; | |
fi | |
- name: run pyuvsim tests | |
run: | | |
pip install --no-deps . | |
cd ../ | |
cd pyuvsim | |
pip install --no-deps . | |
mkdir test-reports | |
python -m pytest pyuvsim --junitxml=test-reports/xunit.xml |