Skip to content

Conversation

@owenlittlejohns
Copy link
Member

Description

This PR adds the GitHub workflows similar to those used in other DAS Harmony services:

  • run_tests.yml - this is the core workflow that executes the unit test suite. It is called for PRs, and also prior to releasing a new version of the service.
  • run_tests_on_pull_requests.yml - this executes the run_tests.yml workflow when a PR is opened or updated.
  • publish_docker_image.yml - this first executes the run_tests.yml workflow and then, if the tests pass, publishes a new Docker image to the GitHub Container registry. It will do this when a new commit gets to main, and the changes include a change to docker/service_version.txt.

I've update the service_version.txt and CHANGELOG.md in order to trigger an initial release to the GitHub container registry.

Jira Issue ID

TRT-611

Local Test Steps

  • N/A - mainly make sure I've updated the workflows to not refer to other repositories.

PR Acceptance Checklist

  • Jira ticket acceptance criteria met.
  • CHANGELOG.md updated to include high level summary of PR changes.
  • docker/service_version.txt updated if publishing a release.
  • Tests added/updated and passing.
  • Documentation updated (if needed).

@owenlittlejohns owenlittlejohns requested review from a team and flamingbear March 28, 2025 18:45
@owenlittlejohns
Copy link
Member Author

owenlittlejohns commented Mar 28, 2025

Here's the latest invocation of the unit tests workflow (via run_tests_on_pull_requests.yml). Things to note:

  • It was triggered at all.
  • The tests passed. (Phew)
  • The artefacts for the test reports are being saved. (I had mixed and matched some old workflows from HOSS and the SMAP L2 Gridder, but now it's all humming along)

@@ -0,0 +1,5 @@

Copy link
Member Author

Choose a reason for hiding this comment

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

This file will need to make it to main before Snyk can be set up to scan requirements.txt and tests/test_requirements.txt. Snyk defaults to Python 3.9, and those requirements include things that need a later version of Python to be able to be installed.

@sudha-murthy sudha-murthy self-assigned this Apr 1, 2025
@sudha-murthy
Copy link
Contributor

Joey and I were able to run this successfully.
Did notice the output was not compressed. We can correct it in the next PR

Copy link
Contributor

@sudha-murthy sudha-murthy left a comment

Choose a reason for hiding this comment

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

It's a good baseline for us to start with. Thanks Owen

@owenlittlejohns owenlittlejohns merged commit 144487f into main Apr 3, 2025
4 checks passed
@owenlittlejohns owenlittlejohns deleted the TRT-611-add-GitHub-CICD branch April 3, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants