Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAS-1937 - Add GitHub workflows for unit tests and Docker image publication. #2

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

owenlittlejohns
Copy link
Member

Description

This PR adds CI/CD to the repository such that it will:

  • Run the unit test suite for all PRs against the main branch.
  • For changes merged to main, with changes to docker/service_version.txt, the tests will run, then the HOSS service Docker image will be built and published, the commit will be tagged and a GitHub release will be created.

Jira Issue ID

DAS-1937

Local Test Steps

I've worked through the teething issues in a fork of the repo:

Note - I will delete this fork after this PR is merged.

PR Acceptance Checklist

  • Jira ticket acceptance criteria met. (Minus the actual publication, which will happen after this PR is merged)
  • CHANGELOG.md updated to include high level summary of PR changes.
  • VERSION updated if publishing a release.
  • Tests added/updated and passing.
  • Documentation updated (if needed).

@owenlittlejohns
Copy link
Member Author

The tests running in this PR are also a good verification of the new run_tests_on_pull_requests.yml and run_tests.yml workflows. 🎉

# write permission is required to create a GitHub release
contents: write
id-token: write
packages: write
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packages permission is new in comparison to HGA and NetCDF-to-Zarr, however, I could not get my fork to create the package without it. I got guidance from StackOverflow and also the GitHub documentation.

@owenlittlejohns
Copy link
Member Author

@flamingbear - sorry to have to tag you again. (I wonder if you aren't added on this repository because even though it starts with "harmony", it was made after you made your NAMS request?)

Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! I was able to fork the repo and run the actions to test a PR to main running the tests and pushing an image to ghcr.io. Didn't see any typos either.

@owenlittlejohns owenlittlejohns merged commit 2dfe694 into main Oct 11, 2023
@owenlittlejohns owenlittlejohns deleted the DAS-1937-hoss-cicd branch November 6, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants