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

GitHub actions for build and test #1

Closed
5 tasks done
Tracked by #2 ...
rukmal opened this issue Sep 12, 2022 · 4 comments
Closed
5 tasks done
Tracked by #2 ...

GitHub actions for build and test #1

rukmal opened this issue Sep 12, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rukmal
Copy link
Member

rukmal commented Sep 12, 2022

Create GitHub workflows to build and test the Ballerina project. Must be able to run locally with act, and on GitHub runners. Covers the complete set of workflows that will be run in a pull request.

  • Build ballerina project
  • db docker container
    • local build
    • push to registry
  • Run ballerina tests
@rukmal rukmal added the enhancement New feature or request label Sep 12, 2022
@rukmal rukmal self-assigned this Sep 12, 2022
@rukmal rukmal added this to the Base GraphQL Functionality milestone Sep 12, 2022
@rukmal rukmal mentioned this issue Sep 12, 2022
2 tasks
@rukmal
Copy link
Member Author

rukmal commented Sep 12, 2022

Note that with act, some dependencies will be installed and run locally, as opposed to using GitHub's service construct for actions. See this comment for details.

@rukmal
Copy link
Member Author

rukmal commented Sep 12, 2022

To change the git context in the docker build action, we must use the buildx builder. See: https://github.com/docker/build-push-action/#git-context

@rukmal
Copy link
Member Author

rukmal commented Sep 13, 2022

docker buildx must be aliased to docker build for both pipelines to work on GitHub and locally. See: https://github.com/docker/setup-buildx-action#install-by-default

@rukmal rukmal closed this as completed in 5442f87 Sep 14, 2022
@rukmal rukmal reopened this Sep 14, 2022
@rukmal
Copy link
Member Author

rukmal commented Sep 14, 2022

Action fails at service container initialization stage with the error:

  /usr/bin/docker --config /home/runner/work/_temp/.docker_35d59d99-2883-4636-9d87-87ae74458d1a pull ghcr.io/Avinya-Foundation/global-data-db:main
  invalid reference format: repository name must be lowercase
  Error: Docker pull failed with exit code 1

This is due to Avinya-Foundation having capital letters. This is the fix: https://github.com/orgs/community/discussions/27086#discussioncomment-3254548

@rukmal rukmal closed this as completed in f0c2bed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant