.NET Core project Continuous Integration setups for public build SaaS services

The following is a working appveyor.yml file for a client library

version: '0.0.{build}'
configuration:
- Release
platform: Any CPU
# Build worker image (VM template)
image: Visual Studio 2017
environment:
  # Don't report back to the mothership
  DOTNET_CLI_TELEMETRY_OPTOUT: 1
init:
- ps: $Env:LABEL = "CI" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0")
before_build:
- appveyor-retry dotnet restore "src\Solcast.sln" -v Minimal
- appveyor-retry dotnet restore "tests\Solcast.Tests.csproj" -v Minimal
build_script:
- dotnet build "src\solcast\Solcast.csproj" -c %CONFIGURATION% --no-dependencies --version-suffix %LABEL%
- dotnet build "tests\Solcast.Tests.csproj" -c %CONFIGURATION% --no-dependencies --version-suffix %LABEL%
after_build:
- dotnet pack "src\solcast\Solcast.csproj" -c %CONFIGURATION% --no-build --version-suffix %LABEL% -o "..\..\NuGet\Solcast"
test_script:
- dotnet test "tests\Solcast.Tests.csproj" -c %CONFIGURATION%
artifacts:
- path: 'NuGet\Solcast\**\*.*'
cache:
- '%USERPROFILE%\.nuget\packages'

And here are a set of files for travis-ci file: .travis.yml

language: csharp
mono: none
dotnet: 2.0.0
before_install:
  - chmod +x ./scripts/build.sh
script:
  - ./scripts/build.sh

build.sh contents

#!/usr/bin/env bash
dotnet restore ./tests/Solcast.Tests.csproj
dotnet build ./tests/Solcast.Tests.csproj
dotnet test ./tests/Solcast.Tests.csproj