Skip to content

Remove Travis, add GitHub Actions, add basic scripted test #45

Remove Travis, add GitHub Actions, add basic scripted test

Remove Travis, add GitHub Actions, add basic scripted test #45

Workflow file for this run

name: Build and Tests
on:
push:
pull_request:
jobs:
get_scala_versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6
- uses: tpunder/cross-scala-versions@master
id: run
outputs:
sbt_versions: ${{ steps.run.outputs.sbt_versions }}
# This builds and runs local tests
build:
needs: get_scala_versions
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
#os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
os: [ 'ubuntu-latest' ]
java: [ '8', '11', '17' ]
sbt: ${{ fromJson(needs.get_scala_versions.outputs.sbt_versions) }}
name: Build/Test - SBT ${{ matrix.sbt }}, Java ${{ matrix.Java }} (${{ matrix.os }})
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- run: sbt ^^${{ matrix.sbt }} test
# This runs the SBT "scripted" tests
scripted:
needs: build # Don't bother running the scripted tests if the main build/test fails.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
#os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
os: [ 'ubuntu-latest' ]
java: [ '8', '11', '17' ]
sbt:
- 0.13.18
- 1.1.6
- 1.2.8
- 1.3.13
- 1.4.9
- 1.5.8
- 1.6.1
exclude:
# These SBT versions don't work on Java 17
- sbt: 1.1.6
java: 17
- sbt: 1.2.8
java: 17
name: Scripted - SBT ${{ matrix.sbt }}, Java ${{ matrix.Java }} (${{ matrix.os }})
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
# This will publishLocal for all crossSbtVersions then test example apps
# using the matrix.sbt version. For example we will publish the 0.13 and
# 1.0 compatible versions of the plugin (via our configured
# crossSbtVersions) and then test using a wider range of SBT versions.
- run: sbt -v ^publishLocal ^^${{ matrix.sbt }} scripted
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}