Skip to content

Commit

Permalink
Add GitHub action "build-gcpy-environment"
Browse files Browse the repository at this point in the history
.github/workflows/build-gcpy-environment.yml
- Added this configuration file for the "build-gcpy-environment"
  GitHub action.  This runs on pushes or PRs made to the main or
  dev branches.  The PR will use setup-micromamba to build the gcpy
  environment, import gcpy, and call a simple plotting script.

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Jan 25, 2024
1 parent 1c986de commit 730cb82
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/build-gcpy-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
#
# 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/setup-micromamba@v1
with:
micromamba-version: 'latest'
environment-file: docs/source/environment.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
- name: Import gcpy in micromamba environment (bash)
run: python -c "import numpy"
shell: bash -el {0}
- name: Run custom command in micromamba environment
run: python -m gcpy.examples.plotting.create_test_plot
shell: micromamba-shell {0}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] - TBD
### Added
- Example script `create_test_plot.py`, which can be used to check that GCPy has been installed properly

- GitHub action `build-gcpy-environment` which tests installation of the mamba environment specified in in `docs/source/environment.yml`

## [1.4.1] - 2023-12-08
### Fixed
Expand Down

0 comments on commit 730cb82

Please sign in to comment.