{"id":16611575,"url":"https://github.com/olafurpg/setup-scala","last_synced_at":"2025-04-05T09:10:22.890Z","repository":{"id":41156391,"uuid":"210125118","full_name":"olafurpg/setup-scala","owner":"olafurpg","description":"GitHub Action to install any version of Java (GraalVM, Java 8, Java 11, Java 14, ...) via Jabba. Works for any JVM language including Java, Scala and Kotlin.","archived":false,"fork":false,"pushed_at":"2023-11-24T12:23:00.000Z","size":740,"stargazers_count":170,"open_issues_count":14,"forks_count":32,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:11:15.477Z","etag":null,"topics":["actions","ci","github-actions","sbt","scala"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olafurpg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-22T09:56:55.000Z","updated_at":"2025-01-05T22:57:11.000Z","dependencies_parsed_at":"2024-08-13T14:40:08.319Z","dependency_job_id":null,"html_url":"https://github.com/olafurpg/setup-scala","commit_stats":{"total_commits":47,"total_committers":14,"mean_commits":3.357142857142857,"dds":0.6382978723404256,"last_synced_commit":"520132c5fb93cae72d3eb41fa74c52caa285d431"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafurpg%2Fsetup-scala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafurpg%2Fsetup-scala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafurpg%2Fsetup-scala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafurpg%2Fsetup-scala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olafurpg","download_url":"https://codeload.github.com/olafurpg/setup-scala/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939195,"owners_count":20857916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","ci","github-actions","sbt","scala"],"created_at":"2024-10-12T01:38:25.623Z","updated_at":"2025-04-05T09:10:22.777Z","avatar_url":"https://github.com/olafurpg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup Scala GitHub Action\n\nA GitHub Action to install Java via [Jabba](https://github.com/shyiko/jabba) and\nsbt.\n\n- Configurable Java version: supports OpenJDK, GraalVM, Zulu and any other Java\n  version that's installable via Jabba.\n- Cross-platform: works on Linux, macOS, Windows.\n- The `sbt` command is provided, with the official sbt launch script.\n- The following alternate sbt launch scripts are also provided:\n  - `sbtx` runs the [sbt-extras](https://github.com/dwijnand/sbt-extras/) launcher.\n  - `csbt` runs the [Coursier-based sbt-extras](https://github.com/coursier/sbt-extras/) launcher.\n\n## Usage:\n\nIn your GitHub Actions workflow, add a `uses:` declaration before calling the\n`sbt` command.\n\n```diff\n+++ .github/workflows/ci.yml\n  name: CI\n  on:\n    push:\n  jobs:\n    build:\n      runs-on: ubuntu-latest\n      steps:\n      - uses: actions/checkout@v1\n+     - uses: olafurpg/setup-scala@v11\n      - name: Compile\n        run: sbt compile\n```\n\nThe default Java version is the latest OpenJDK 8 HotSpot version via\n[AdoptOpenJDK](https://adoptopenjdk.net/). To customize the Java version add a\n`with:` declaration. For example, to use the latest AdoptOpenJDK 11 version\n\n```diff\n+++ .github/workflows/ci.yml\n  name: CI\n  on:\n    push:\n  jobs:\n    build:\n      runs-on: ubuntu-latest\n      steps:\n      - uses: actions/checkout@v1\n      - uses: olafurpg/setup-scala@v11\n+       with:\n+         java-version: adopt@1.11\n      - name: Compile\n        run: sbt compile\n```\n\nMore Java version examples:\n\n- `graalvm@`: the latest GraalVM\n- `openjdk@1.14`: the latest OpenJDK 14 version\n- `zulu@1.11`: the latest Zulu OpenJDK 11\n- `graalvm@20.2.0=tgz+https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java11-linux-amd64-20.2.0.tar.gz`:\n  custom Java version from a URL\n\n## Tips and tricks\n\nSome suggestions that may be helpful when using GitHub Actions.\n\n### Disable `fail-fast` strategy\n\nBy default, GitHub Actions stops running jobs on the first failure. Add the\nfollowing configuration to ensure that all jobs run on every PR even if one job\nfails.\n\n```diff\n+++ .github/workflows/ci.yml\n  name: CI\n  on: [push]\n  jobs:\n    build:\n      runs-on: ubuntu-latest\n+     strategy:\n+       fail-fast: false\n      steps:\n      - uses: actions/checkout@v1\n      - uses: olafurpg/setup-scala@v11\n      - name: Compile\n        run: sbt compile\n```\n\n### Browsing raw logs\n\nSearching through large logs in the GitHub Actions web UI can be slow sometimes.\nIt can be faster to look at the raw logs instead.\n\n![](https://i.imgur.com/Xu29gwb.png)\n\n### Configuring Windows jobs\n\nWhen running jobs on Windows, you may want to default to the `bash` shell and\nconfigure git to disable Windows line feeds.\n\n```diff\n+++ .github/workflows/ci.yml\n  name: CI\n  on: [push]\n  jobs:\n    build:\n-     runs-on: ubuntu-latest\n+     runs-on: windows-latest\n      steps:\n+     - name: Configure git\n+       run: \"git config --global core.autocrlf false\"\n+       shell: bash\n      - uses: actions/checkout@v1\n      - uses: olafurpg/setup-scala@v11\n      - name: Compile\n+       shell: bash\n        run: sbt compile\n```\n\n### Faster checkout of big repos\n\nYour repository can have a lot of commits, or branches with bulk resources. The\nv2 version of `actions/checkout` doesn't fetch a whole repo by default that can\nspeed up builds greatly. But an additional configuration can be required to\nfetch tags up to some level of depth for some builds which check binary\ncompatibility with previous tagged release from the branch.\n\n```diff\n+++ .github/workflows/ci.yml\n  name: CI\n  on: [push]\n  jobs:\n    build:\n      runs-on: ubuntu-latest\n      steps:\n-     - uses: actions/checkout@v1\n+     - uses: actions/checkout@v2\n+       with:\n+         fetch-depth: 100\n+     - name: Fetch tags\n+       run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*\n      - uses: olafurpg/setup-scala@v11\n      - name: Compile\n        run: sbt compile\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folafurpg%2Fsetup-scala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folafurpg%2Fsetup-scala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folafurpg%2Fsetup-scala/lists"}