Fixup muon damping figure (#55) #271
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: test | |
on: | |
push: null | |
jobs: | |
test: | |
name: test | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-11] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Detect platform | |
id: detect | |
run: | | |
if [[ "${RUNNER_ARCH}" == "X64" ]]; then | |
if [[ "${RUNNER_OS}" == "Linux" ]]; then | |
echo '::set-output name=platform::linux-64' && exit 0 | |
elif [[ "${RUNNER_OS}" == "macOS" ]]; then | |
echo '::set-output name=platform::osx-64' && exit 0 | |
fi | |
fi | |
echo "Unsupported platform ${RUNNER_OS} ${RUNNER_ARCH}" | |
exit 1 | |
- uses: actions/checkout@v2 | |
- name: Cache conda pacakges | |
uses: actions/cache@v2 | |
env: | |
# Increase this value to reset cache if etc/example-environment.yml has not changed | |
CACHE_NUMBER: 0 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | |
conda-${{ steps.detect.outputs.platform }}-${{ env.CACHE_NUMBER }}-${{hashFiles('conda-lock.yml') }} | |
- name: Set up conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: false | |
activate-environment: test-env | |
environment-file: conda-${{ steps.detect.outputs.platform }}.lock | |
- name: Install pip deps | |
run: | | |
cat conda-${{ steps.detect.outputs.platform }}.lock | awk '/^# pip/ {print substr($0,7)}' > requirements.txt | |
pip install --no-deps -r requirements.txt | |
- name: Install project | |
env: | |
ICECUBE_PASSWORD: ${{ secrets.ICECUBE_PASSWORD }} | |
run: | | |
pip install --no-deps . | |
pip check | |
- name: Run unit tests | |
run: | | |
pytest tests | |
# Too memory-hungry for GitHub hosted runners | |
# - name: Run demo notebooks | |
# run: | | |
# pytest --nbmake notebooks |