Skip to content

Merge branch 'main' into add_write_oasis_mesh_files #367

Merge branch 'main' into add_write_oasis_mesh_files

Merge branch 'main' into add_write_oasis_mesh_files #367

Workflow file for this run

# original version by @suvarchal
name: pyfesom2 short test
# Controls when the action will run. Triggers the workflow on push or pull request.
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
name: ${{matrix.os}}-py-${{matrix.python-version}}
runs-on: ${{ matrix.os }} #, macos-latest, windows-latest]
strategy:
#max-parallel: 1
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Checkout pyfesom2
uses: actions/checkout@v3
with:
repository: FESOM/pyfesom2
path: pyfesom2
fetch-depth: 0
- name: Update SSL on MacOS
if: contains(matrix.os, 'macos')
run: |
brew update
brew reinstall openssl
sudo mkdir -p /usr/local/lib
sudo ln -sv /opt/homebrew/opt/openssl/lib/libcrypto.3.dylib /usr/local/lib/
- name: install conda environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: main/ci/requirements-py37.yml
environment-name: pyfesom2
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
init-shell: >-
bash
zsh
# - name: Checkout git commit log
# working-directory: pyfesom2
# run: |
# git checkout suvi_test_branch_workflow
# git log
- name: Checkout xarray version
run: |
python -c "import xarray; print('xarray version:', xarray.__version__)"
python -c "import netCDF4; print('netcdf4 (py,c) versions:', netCDF4.__version__, netCDF4._netCDF4.__netcdf4libversion__)"
- name: Install pyfesom2
working-directory: pyfesom2
run: |
python -m pip install -e .
- name: Test pyfesom2 import
working-directory: pyfesom2
run: |
python -c "import pyfesom2"
- name: Test pyfesom2
working-directory: pyfesom2
run: |
pytest