-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from nsidc/use-github-actions
Use GitHub actions
- Loading branch information
Showing
13 changed files
with
18,434 additions
and
271 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
name: build_and_release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
# Default to bash in login mode; key to activating conda environment | ||
# https://github.com/mamba-org/provision-with-micromamba#IMPORTANT | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
jobs: | ||
experimental_build: | ||
name: "Run build" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out repository" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Conda environment" | ||
uses: "mamba-org/setup-micromamba@v1" | ||
with: | ||
environment-file: "conda-lock.yml" | ||
# When using a lock-file, we have to set an environment name. | ||
environment-name: "pm_icecon-ci" | ||
cache-environment: true | ||
# Increase this key to trigger cache invalidation | ||
cache-environment-key: 1 | ||
|
||
- name: "Run conda build" | ||
run: "conda build recipe/" | ||
|
||
- name: "run anaconda upload" | ||
env: | ||
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | ||
run: | | ||
for ARTIFACT in $(ls /home/runner/micromamba/envs/pm_icecon-ci/conda-bld/noarch/*.tar.bz2) ; do | ||
anaconda -t $ANACONDA_TOKEN upload -u nsidc -l main $ARTIFACT | ||
done |
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,38 @@ | ||
# This workflow runs an experimental build for this package using `boa` to | ||
# enable the use of the `mamba` solver in conda-build. `boa` is under | ||
# development, so this is just to quickly test that the build works on pushes to | ||
# `main`. When we publish the package, we will use a separate workflow for | ||
# building it with `conda-build`. | ||
name: experimental_build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Default to bash in login mode; key to activating conda environment | ||
# https://github.com/mamba-org/provision-with-micromamba#IMPORTANT | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
jobs: | ||
experimental_build: | ||
name: "Run experimental build with boa" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out repository" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Conda environment" | ||
uses: "mamba-org/setup-micromamba@v1" | ||
with: | ||
environment-file: "conda-lock.yml" | ||
# When using a lock-file, we have to set an environment name. | ||
environment-name: "pm_icecon-ci" | ||
cache-environment: true | ||
# Increase this key to trigger cache invalidation | ||
cache-environment-key: 1 | ||
|
||
- name: "run experimental build" | ||
run: "conda mambabuild recipe/" |
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,39 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Default to bash in login mode; key to activating conda environment | ||
# https://github.com/mamba-org/provision-with-micromamba#IMPORTANT | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
jobs: | ||
test: | ||
name: "Run tests" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out repository" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Conda environment" | ||
uses: "mamba-org/setup-micromamba@v1" | ||
with: | ||
environment-file: "conda-lock.yml" | ||
# When using a lock-file, we have to set an environment name. | ||
environment-name: "pm_icecon-ci" | ||
cache-environment: true | ||
# Increase this key to trigger cache invalidation | ||
cache-environment-key: 1 | ||
|
||
# Linter | ||
- name: "Run pre-commit tests" | ||
run: "pre-commit run --all-files" | ||
|
||
# Run mypy and unit tests Unit tests | ||
- name: "Run unit tests" | ||
run: "invoke test.ci" |
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
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
Oops, something went wrong.