Merge pull request #30 from VirtualPlanetaryLaboratory/PipInstall #70
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: tests | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
jobs: | |
tests: | |
name: 'Run tests on py${{ matrix.python-version }}' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python-version: '3.6' | |
- python-version: '3.7' | |
- python-version: '3.8' | |
- python-version: '3.9' | |
- python-version: '3.10' | |
- python-version: '3.11' | |
- python-version: '3.12' | |
steps: | |
- name: Clone vplot repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: vplot | |
environment-file: environment.yml | |
# TODO: Remove this step in production | |
- name: Install vplanet | |
shell: bash -l {0} | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
run: | | |
python -m pip install --no-deps vplanet | |
- name: Install vplot | |
shell: bash -l {0} | |
run: | | |
python -m pip install -U pip | |
python -m pip install -e . | |
- name: Run vplanet | |
shell: bash -l {0} | |
run: | | |
for f in docs/notebooks/examples/*/vpl.in | |
do | |
pushd ${f%/*} | |
vplanet vpl.in | |
popd | |
done | |
- name: Run tests | |
shell: bash -l {0} | |
run: python -m pytest -v tests --junitxml=junit/test-results.xml | |
- name: Publish unit test results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: junit/test-*.xml | |
comment_mode: update last |