Skip to content

Commit

Permalink
Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Oct 9, 2023
1 parent 3c8cac3 commit f3273ee
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 99 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"

0 comments on commit f3273ee

Please sign in to comment.