name: Scala CI

on:
  push:
    branches:
    - master
    - 1.14.x
    - 1.15.x
  pull_request:
    branches: [ '*' ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        scala:
        - 2.11.12
        - 2.12.10
        - 2.13.3
        - 0.27.0-RC1
        jdk:
        - 1.8
        - 11
        platform:
        - jvm
        - js
        scalajs_version:
        - 0.6.33
        - 1.3.0
        sbt_parallel: [true]
        workers:
        - 4
        deploy: [false]
        exclude:
        - platform: jvm
          scalajs_version: 1.3.0
        - platform: js
          jdk: 11
        - platform: js
          scala: 0.27.0-RC1
        - platform: js
          scala: 2.11.12
        - jdk: 11
          scala: 2.11.12
        - jdk: 11
          scala: 0.27.0-RC1
    steps:
    - uses: actions/checkout@v2
    - name: before cache
      continue-on-error: true
      run: |
        rm -fv ~/.ivy2/.sbt.ivy.lock 
        find ~/.ivy2/cache -name 'ivydata-*.properties' -print -delete
        find ~/.sbt        -name '*.lock'               -print -delete
    - uses: actions/cache@v2
      with:
        path: |
          ~/.ivy2/cache
          ~/.coursier/cache/v1
        key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
        restore-keys: |
          ${{ runner.os }}-sbt-
    - name: Set up JDK ${{ matrix.jdk }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.jdk }}
    - name: Build with sbt
      run: |
        ./tools/travis-script.sh
        ./tools/travis-deploy.sh
      env:
        TRAVIS_BRANCH: ${env:GITHUB_REF}
        TRAVIS_COMMIT: ${env:GITHUB_SHA}
        TRAVIS_JDK_VERSION: ${{ matrix.java }}
        TRAVIS_SCALA_VERSION: ${{ matrix.scala }}
        PLATFORM: ${{ matrix.platform }}
        SCALAJS_VERSION: ${{ matrix.scalajs_version }}
        SBT_PARALLEL: ${{ matrix.sbt_parallel }}
        WORKERS: ${{ matrix.workers }}
        DEPLOY: ${{ matrix.deploy }}

Add initial GitHub Action config
Add initial GitHub Action config

Runs a very basic build of JS and JVM including Dotty, still needs:
* Scala native builds
* Build example projects
* Running benchmark smoke test
