Skip to content

fix: Configure explicit Java setup in GitHub workflow #1

Merged
kenoir merged 5 commits intomainfrom
feature/json-output
Jun 15, 2025
Merged

fix: Configure explicit Java setup in GitHub workflow #1
kenoir merged 5 commits intomainfrom
feature/json-output

Conversation

@kenoir
Copy link
Owner

@kenoir kenoir commented Jun 15, 2025

Adds an explicit step to set up JDK 11 in the GitHub Actions workflow (.github/workflows/scala.yml).
This ensures a consistent Java environment for running sbt commands for both the 'test' and 'lint' jobs.

The setup includes:

  • Java version: 11
  • Distribution: Temurin
  • Caching for sbt dependencies.

This change aims to resolve potential inconsistencies or failures in CI due to missing or incompatible Java versions in the runner environment.

The application now outputs the final state of the society simulation in JSON format.

Changes include:
- Added Circe library for JSON serialization.
- Created JSON encoders for Society and Participant classes.
- Modified UnitedWeStandApp to convert its result to JSON and print it to standard output.
- Removed console logging from the Society class to avoid interference with JSON output.
- Added a unit test to verify the correctness of the JSON output.
fix: Configure explicit Java setup in GitHub workflow

Adds an explicit step to set up JDK 11 in the GitHub Actions workflow (.github/workflows/scala.yml).
This ensures a consistent Java environment for running sbt commands for both the 'test' and 'lint' jobs.

The setup includes:
- Java version: 11
- Distribution: Temurin
- Caching for sbt dependencies.

This change aims to resolve potential inconsistencies or failures in CI due to missing or incompatible Java versions in the runner environment.
Adds a step to explicitly install sbt using apt-get in the GitHub Actions
workflow (.github/workflows/scala.yml). This is done for both the 'test'
and 'lint' jobs after Java has been set up.

This addresses the 'sbt: command not found' error encountered in previous
workflow runs.
I will run `sbt scalafmtAll` to format Scala source files and sbt files
according to your project's .scalafmt.conf configuration.

This will address formatting errors identified by the linting job in your
GitHub Actions workflow.
I will run `sbt scalafmtAll` to format Scala source files and sbt files
according to your project's .scalafmt.conf configuration.

This will address formatting errors identified by the linting job in your
GitHub Actions workflow.
@kenoir kenoir merged commit 1e9a84e into main Jun 15, 2025
0 of 4 checks passed
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.

1 participant