Skip to content

Commit

Permalink
Added Layer constructor for Zio. Refactored existing. Added Github Ac…
Browse files Browse the repository at this point in the history
…tions for CI (#254)

* Added Layer constructor for Zio. Refactored existing. Added Github
Actions for CI

* Added snapshot on master

* Add release workflow

* Added cache. Removed travis file

* Removed ci plugin, fixed cross build version
  • Loading branch information
barambani committed Nov 28, 2020
1 parent af3211a commit 4e71d9e
Show file tree
Hide file tree
Showing 16 changed files with 622 additions and 362 deletions.
127 changes: 127 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI
on:
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
format:
name: Format
runs-on: ubuntu-20.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache
uses: actions/cache@v2
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Check with Scalafmt
run: sbt ++2.13.4 checkFormat
build:
name: Build
strategy:
matrix:
os:
- ubuntu-20.04
scala:
- 2.12.12
- 2.13.4
java:
- [email protected]
- [email protected]
runs-on: ${{ matrix.os }}
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v10
with:
java-version: ${{ matrix.java }}
- name: Cache
uses: actions/cache@v2
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Test - [ ${{ matrix.java }} ] [ ${{ matrix.scala }} ]
run: sbt ++${{ matrix.scala }} ciBuild
publish_212:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Publish Snapshot 2.12
needs: [format, build]
runs-on: ubuntu-20.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache
uses: actions/cache@v2
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Publish Snapshot for Scala 2.12
run: CI_SNAPSHOT_RELEASE=publish sbt ++2.12.2 releaseIt
publish_213:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Publish Snapshot 2.13
needs: publish_212
runs-on: ubuntu-20.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache
uses: actions/cache@v2
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Publish Snapshot for Scala 2.13
run: CI_SNAPSHOT_RELEASE=publish sbt ++2.13.4 releaseIt
61 changes: 61 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release
on:
release:
types:
- created
jobs:
release_212:
if: github.ref == 'refs/heads/master'
name: Release 2.12
runs-on: ubuntu-20.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache
uses: actions/cache@v2
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Release for Scala 2.12
run: CI_RELEASE=publishSigned sbt ++2.12.2 releaseIt
release_213:
if: github.ref == 'refs/heads/master'
name: Release 2.13
needs: release_212
runs-on: ubuntu-20.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache
uses: actions/cache@v2
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Release for Scala 2.13
run: CI_RELEASE=publishSigned sbt ++2.13.4 releaseIt
84 changes: 0 additions & 84 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 4e71d9e

Please sign in to comment.