-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub action "build-gcpy-environment"
.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
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
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
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} |
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