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

Add continuous integration support via GitHub Actions #22

Merged
merged 1 commit into from
Oct 24, 2020

Conversation

hectcastro
Copy link
Contributor

@hectcastro hectcastro commented Oct 17, 2020

Exercise the project initialization process via continuous integration on every PR and merges to master. In addition:

  • Add support for keeping GitHub Actions up-to-date with Dependabot
  • Add support for automatically merging Dependabot PRs that pass CI
  • Add support for marking inactive issues as stale, and eventually closing them
  • Update sbt-extras script
  • Fix the Typesafe repository resolver

Testing

Review the build output associated with this PR.

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This helps keep GitHub Actions up-to-date via Dependabot PRs.

- name: Set up Scala ${{ matrix.jdk-version }}
uses: olafurpg/setup-scala@v10
with:
java-version: ${{ matrix.jdk-version }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears that Jabba is being used under the covers by this Action. If we want to test against additional JDK versions, we can add them to the jdk-version matrix list above.


- name: Create new project from template
run: |
sbt new file://${GITHUB_WORKSPACE} \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GITHUB_WORKSPACE here corresponds to the project directory checked out by actions/checkout.

types:
- completed

jobs:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of these is responsible for dependabot.yml initiated PRs and the other is for GitHub Security PRs.

@@ -9,5 +9,5 @@ lazy val root = (project in file("."))
val _ = (g8Test in Test).toTask("").value
},
scriptedLaunchOpts ++= List("-Xms1024m", "-Xmx1024m", "-XX:ReservedCodeCacheSize=128m", "-Xss2m", "-Dfile.encoding=UTF-8"),
resolvers += Resolver.url("typesafe", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)
resolvers += Resolver.url("typesafe", url("https://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was leading to connection refused errors during dependency resolution.

sbt
@@ -34,8 +34,8 @@

set -o pipefail

declare -r sbt_release_version="1.3.13"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the changes here are from pasting in the most up-to-date version of sbt-extras.

@hectcastro hectcastro marked this pull request as ready for review October 17, 2020 18:14
Copy link
Contributor

@jisantuc jisantuc left a comment

Choose a reason for hiding this comment

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

Would it also make sense to copy this configuration into the project to create (under src/main/g8)? If people want to use a different CI, they can remove it, but if not we can include a note in the template setup about setting the appropriate secret in github

@hectcastro
Copy link
Contributor Author

Would it also make sense to copy this configuration into the project to create (under src/main/g8)? If people want to use a different CI, they can remove it, but if not we can include a note in the template setup about setting the appropriate secret in github

Before marking the PR ready for review, I went through the issue list and almost linked #1 to this PR as resolved. I ultimately didn't because it seemed like two different concerns: CI for the project template vs. CI for instances of the project template.

I'm personally interested in resolving #1, but I think doing so in a separate PR makes sense since I think the testing cycle for it will be more involved.

BTW, are you OK with me assigning you to review this PR?

@jisantuc
Copy link
Contributor

That makes sense to me and I'm happy to review this

@jisantuc jisantuc self-requested a review October 19, 2020 21:39
Exercise the project initializaotion process via continuous
integration on every PR and merges to master. In addition:

- Add support for keeping GitHub Actions up-to-date with Dependabot
- Add support for automatically merging Dependabot PRs that pass CI
- Add support for marking inactive issues as stale, and eventually
closing them
- Update `sbt-extras` script
- Fix the Typesafe repository resolver
@hectcastro hectcastro changed the title Add continuous ingestion support via GitHub Actions Add continuous integration support via GitHub Actions Oct 24, 2020
@hectcastro hectcastro merged commit e620910 into master Oct 24, 2020
@hectcastro hectcastro deleted the hmc/github-actions branch October 24, 2020 22:49
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