Skip to content

Commit

Permalink
Test 23
Browse files Browse the repository at this point in the history
  • Loading branch information
Atharva Arya committed Jan 21, 2025
1 parent 21214fc commit 16efddc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
22 changes: 12 additions & 10 deletions .github/actions/setup_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ inputs:
runs:
using: "composite"
steps:
- name: Download Lock File
run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-${{ inputs.os-label }}.lock
if: matrix.pip == true
shell: bash

- name: Generate Cache Key
run: |
file_hash=$(cat conda-${{ inputs.os-label }}.lock | shasum -a 256 | cut -d' ' -f1)
echo "file_hash=$file_hash" >> "${GITHUB_OUTPUT}"
id: cache-environment-key
shell: bash

- uses: mamba-org/setup-micromamba@v2
with:
init-shell: bash
Expand All @@ -22,13 +34,3 @@ runs:
conda-lock install --prefix micromamba_tardis conda-${{ inputs.os-label }}.lock
micromamba activate ./micromamba_tardis
shell: bash -el {0}

- name: test
run: |
micromamba activate ./micromamba_tardis
pytest
shell: bash -el {0}
continue-on-error: true



9 changes: 7 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,19 @@ jobs:
mkdir -p ~/Downloads/tardis-data && cp -a ./tardis-regression-data/atom_data/. ~/Downloads/tardis-data
- name: Install package
run: pip install -e .
run: |
micromamba activate ./micromamba_tardis
pip install -e .
- name: Install Sphinx extensions
run: |
micromamba activate ./micromamba_tardis
pip install sphinxcontrib-googleanalytics
- name: Build documentation
run: cd docs/ && make html NCORES=auto
run: |
micromamba activate ./micromamba_tardis
cd docs/ && make html NCORES=auto
- name: Set destination directory
run: |
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,30 @@ jobs:
- name: Install package editable
if: ${{ !inputs.pip_git }}
run: |
micromamba activate ./micromamba_tardis
pip install -e . --user
- name: Install package git
if: ${{ inputs.pip_git }}
run: |
micromamba activate ./micromamba_tardis
pip install git+https://github.com/tardis-sn/tardis.git@master
- name: Install qgridnext
if: ${{ !inputs.pip_git }}
run: |
micromamba activate ./micromamba_tardis
pip install qgridnext
- name: Run tests
run: pytest tardis ${{ env.PYTEST_FLAGS }} -m "${{ matrix.continuum }} continuum"
run: |
micromamba activate ./micromamba_tardis
pytest tardis ${{ env.PYTEST_FLAGS }} -m "${{ matrix.continuum }} continuum"
- name: Regression Data Generation tests
run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum"
run: |
micromamba activate ./micromamba_tardis
pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum"
if: contains(github.event.pull_request.labels.*.name, 'run-generation-tests') || github.ref == 'refs/heads/master'

- run: mv .coverage .coverage.${{ strategy.job-index }}
Expand Down

0 comments on commit 16efddc

Please sign in to comment.