Skip to content

Commit

Permalink
Merge pull request #22 from nsidc/migrate-to-gha
Browse files Browse the repository at this point in the history
Migrate to GitHub Actions
  • Loading branch information
mfisher87 committed Oct 10, 2023
2 parents 3c8cac3 + eb4fa27 commit 5417672
Show file tree
Hide file tree
Showing 7 changed files with 6,316 additions and 306 deletions.
99 changes: 0 additions & 99 deletions .circleci/config.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/container_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Docker container image"

on:
push:
branches:
- "main"
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"


jobs:
# When a push to the default branch occurs, build and release "latest" images
# When a tag `vX.Y.Z` push occurs, build and release images with that tag

build-and-release-image:
name: "Build and release the data server container image"
needs:
- "test"
uses: "nsidc/.github/.github/workflows/build-and-publish-container-image.yml@main"
secrets: "inherit"

# TODO: Decouple the two images
build-and-release-ingest-image:
name: "Build and release the ingest container image"
needs:
- "build-and-release-image"
uses: "nsidc/.github/.github/workflows/build-and-publish-container-image.yml@main"
secrets: "inherit"
with:
docker-file-name: "Dockerfile.ingest"
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Test"

on:
push:
branches:
- "main"
pull_request:


# 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: "ci"
cache-environment: true
# Increase this key to trigger cache invalidation
cache-environment-key: 0

- name: "Run tests"
# TODO: Nox instead!
run: "inv test"
Loading

0 comments on commit 5417672

Please sign in to comment.