All Projects → olafurpg → Setup Scala

olafurpg / Setup Scala

Licence: mit
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.

Programming Languages

typescript
32286 projects
scala
5932 projects

Labels

Projects that are alternatives of or similar to Setup Scala

Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (-11.38%)
Mutual labels:  ci
Sbt Jacoco
JaCoCo Code Coverage plug-in for sbt.
Stars: ✭ 115 (-6.5%)
Mutual labels:  sbt
Ci Matters
Integration (comparison) of different continuous integration services on Android project
Stars: ✭ 119 (-3.25%)
Mutual labels:  ci
Sbt S3 Resolver
☁️Amazon S3-based resolver for sbt
Stars: ✭ 112 (-8.94%)
Mutual labels:  sbt
Action Android
Collection of Android-related GitHub Actions
Stars: ✭ 116 (-5.69%)
Mutual labels:  ci
Mirrorgate
MirrorGate DevOps Dashboard
Stars: ✭ 117 (-4.88%)
Mutual labels:  ci
Go Gitlab Client
A Go gitlab API client & powerful CLI written in Go
Stars: ✭ 107 (-13.01%)
Mutual labels:  ci
Rspecq
Optimally distribute and run RSpec suites among parallel workers; for faster CI builds
Stars: ✭ 122 (-0.81%)
Mutual labels:  ci
Lastbackend
System for containerized apps management. From build to scaling.
Stars: ✭ 1,536 (+1148.78%)
Mutual labels:  ci
Cypress Example Docker Circle
Cypress + Docker + CircleCI = ❤️
Stars: ✭ 119 (-3.25%)
Mutual labels:  ci
Sbt Unidoc
sbt plugin to create a unified API document across projects
Stars: ✭ 113 (-8.13%)
Mutual labels:  sbt
Kontinuous
The Kubernetes Continuous Integration & Delivery Platform (CI/CD) 🔄
Stars: ✭ 115 (-6.5%)
Mutual labels:  ci
Git Webhook Ci
A Git (github/gitee) webhook callback server to do stuff e.g. fetch new code (poor man CI)
Stars: ✭ 118 (-4.07%)
Mutual labels:  ci
Lxc Ci
LXC continuous integration and build scripts
Stars: ✭ 110 (-10.57%)
Mutual labels:  ci
Golang Action
A GitHub Action to run Go commands
Stars: ✭ 119 (-3.25%)
Mutual labels:  ci
Sbt Native Packager
sbt Native Packager
Stars: ✭ 1,480 (+1103.25%)
Mutual labels:  sbt
Scalafx Ensemble
scalafx ensemble
Stars: ✭ 116 (-5.69%)
Mutual labels:  sbt
Mqperf
Stars: ✭ 122 (-0.81%)
Mutual labels:  sbt
Idea Cli Inspector
A little command-line tool to integrate the awesome IntelliJ IDEA code inspections in your continuous integration (CI) process using Jenkins, Bamboo, et. al.
Stars: ✭ 120 (-2.44%)
Mutual labels:  ci
Stryker4s
Mutation testing for Scala. Work in progress...
Stars: ✭ 118 (-4.07%)
Mutual labels:  sbt

Setup Scala GitHub Action

A GitHub Action to install Java via Jabba and sbt.

  • Configurable Java version: supports OpenJDK, GraalVM, Zulu and any other Java version that's installable via Jabba.
  • The sbt command is installed using the paulp/sbt-extras launcher.
  • For faster startup, the csbt command is installed using the Coursier-based coursier/sbt-extras launcher. This launcher does not work with all builds, only use csbt if you know what you are doing.
  • Cross-platform: works on Linux, macOS, Windows.

Usage:

In your GitHub Actions workflow, add a uses: declaration before calling the sbt command.

+++ .github/workflows/ci.yml
  name: CI
  on:
    push:
  jobs:
    build:
      runs-on: ubuntu-latest
      steps:
      - uses: actions/[email protected]
+     - uses: olafurpg/[email protected]
      - name: Compile
        run: sbt compile

The default Java version is the latest OpenJDK 8 HotSpot version via AdoptOpenJDK. To customize the Java version add a with: declaration. For example, to use the latest AdoptOpenJDK 11 version

+++ .github/workflows/ci.yml
  name: CI
  on:
    push:
  jobs:
    build:
      runs-on: ubuntu-latest
      steps:
      - uses: actions/[email protected]
      - uses: olafurpg/[email protected]
+       with:
+         java-version: [email protected]
      - name: Compile
        run: sbt compile

More Java version examples:

Tips and tricks

Some suggestions that may be helpful when using GitHub Actions.

Disable fail-fast strategy

By default, GitHub Actions stops running jobs on the first failure. Add the following configuration to ensure that all jobs run on every PR even if one job fails.

+++ .github/workflows/ci.yml
  name: CI
  on: [push]
  jobs:
    build:
      runs-on: ubuntu-latest
+     strategy:
+       fail-fast: false
      steps:
      - uses: actions/[email protected]
      - uses: olafurpg/[email protected]
      - name: Compile
        run: sbt compile

Browsing raw logs

Searching through large logs in the GitHub Actions web UI can be slow sometimes. It can be faster to look at the raw logs instead.

Configuring Windows jobs

When running jobs on Windows, you may want to default to the bash shell and configure git to disable Windows line feeds.

+++ .github/workflows/ci.yml
  name: CI
  on: [push]
  jobs:
    build:
-     runs-on: ubuntu-latest
+     runs-on: windows-latest
      steps:
+     - name: Configure git
+       run: "git config --global core.autocrlf false"
+       shell: bash
      - uses: actions/[email protected]
      - uses: olafurpg/[email protected]
      - name: Compile
+       shell: bash
        run: sbt compile

Faster checkout of big repos

Your repository can have a lot of commits, or branches with bulk resources. The v2 version of actions/checkout doesn't fetch a whole repo by default that can speed up builds greatly. But an additional configuration can be required to fetch tags up to some level of depth for some builds which check binary compatibility with previous tagged release from the branch.

+++ .github/workflows/ci.yml
  name: CI
  on: [push]
  jobs:
    build:
      runs-on: ubuntu-latest
      steps:
-     - uses: actions/[email protected]
+     - uses: actions/[email protected]
+       with:
+         fetch-depth: 100
+     - name: Fetch tags
+       run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
      - uses: olafurpg/[email protected]
      - name: Compile
        run: sbt compile
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].