Skip to content

Add GitHub action to build GCPy environment and test installation #4

Add GitHub action to build GCPy environment and test installation

Add GitHub action to build GCPy environment and test installation #4

---
#
# GitHub action to build the GCPy environment with micromamba
# See: https://github.com/marketplace/actions/setup-micromamba
#
name: build-gcpy-environment
on:
push:
branches: [ "main", "dev" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: mamba-org/[email protected]
with:
micromamba-version: 'latest'
environment-file: ./docs/environment_files/environment.yml
init-shell: bash
cache-environment: true
generate-run-shell: true
post-cleanup: 'all'
- name: Activate the GCPy environment
run: python -c "import gcpy"
shell: micromamba-shell {0}
- name: Run custom command in micromamba environment
run: python -m gcpy.examples.plotting.create_test_plot
shell: micromamba-shell {0}