Skip to content

Migrate from Cats Effect 2 to Cats Effect 3 #92

Migrate from Cats Effect 2 to Cats Effect 3

Migrate from Cats Effect 2 to Cats Effect 3 #92

Workflow file for this run

name: build
on:
pull_request:
branches: [ 'series/*' ]
push:
branches: [ 'series/*' ]
tags: [ "v[0-9]+*" ]
jobs:
jvm-tests:
name: JVM / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 11, 17, 21, 25 ]
# WARN: build.sbt depends on this key path, as scalaVersion and
# crossScalaVersions is determined from it
scala: [ 2.13.18, 3.3.7 ]
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: sbt/setup-sbt@v1
- name: Cache ivy2
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache sbt
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: sbt ci-jvm
run: ./.github/scripts/exec-sbt-command
env:
SCALA_VERSION: ${{ matrix.scala }}
PLATFORM: ${{ matrix.java }}
SBT_COMMAND: ci-jvm
js-tests:
name: JS / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# WARN: build.sbt depends on this key path, as scalaVersion and
# crossScalaVersions is determined from it
include:
- { java: 11, scala: 2.13.18 }
- { java: 11, scala: 3.3.7 }
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: sbt/setup-sbt@v1
- name: Cache ivy2
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache sbt
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 14
- name: sbt ci-js
run: |
./.github/scripts/exec-sbt-command
env:
SCALA_VERSION: ${{ matrix.scala }}
PLATFORM: ${{ matrix.java }}
SBT_COMMAND: ci-js
mima:
name: Mima / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { java: 11, scala: 2.13.18 }
- { java: 11, scala: 3.3.7 }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: sbt/setup-sbt@v1
- name: Cache ivy2
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache sbt
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: sbt mimaReportBinaryIssues
run: |
./.github/scripts/exec-sbt-command
env:
SCALA_VERSION: ${{ matrix.scala }}
SBT_COMMAND: mimaReportBinaryIssues
unidoc:
name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { java: 11, scala: 2.13.18 }
# TODO: enable this after it works!
# - { java: 11, scala: 3.3.5 }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: sbt/setup-sbt@v1
- name: Cache ivy2
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Cache sbt
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: sbt unidoc
run: |
./.github/scripts/exec-sbt-command
env:
SCALA_VERSION: ${{ matrix.scala }}
SBT_COMMAND: unidoc
all_tests:
name: All Tests
needs: [ jvm-tests, js-tests, mima, unidoc ]
runs-on: ubuntu-latest
steps:
- name: Ack
run: |
echo "All done."
publish:
name: Publish to Sonatype
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/3.x')
needs: [ all_tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- uses: sbt/setup-sbt@v1
- name: Install GnuPG2
run: |
./.github/scripts/setup-pgp
- name: .github/scripts/release
run: |
.github/scripts/release
env:
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PUBLISH_STABLE_VERSION: false