From 3a921b65290a56a9ac615e2810b1858309a78ab8 Mon Sep 17 00:00:00 2001 From: Danil Zasypkin Date: Fri, 6 Nov 2020 12:02:27 +0500 Subject: [PATCH] Replace Travis CI with Github Actions, add Release Drafter --- .github/release-drafter.yml | 20 ++++++++++++ .github/workflows/label-verifier.yml | 13 ++++++++ .github/workflows/release-drafter.yml | 16 ++++++++++ .github/workflows/scala.yml | 44 +++++++++++++++++++++++++++ .travis.yml | 11 ------- README.md | 2 +- 6 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/label-verifier.yml create mode 100644 .github/workflows/release-drafter.yml create mode 100644 .github/workflows/scala.yml delete mode 100644 .travis.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..96b1b2b4 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,20 @@ +name-template: '$NEXT_PATCH_VERSION' +tag-template: '$NEXT_PATCH_VERSION' +categories: + - title: "Documentation" + labels: + - 'documentation' + - title: 'Features' + labels: + - 'new feature' + - 'enhancement' + - 'performance improvement' + - title: 'Bug Fixes' + labels: + - 'bug' +exclude-labels: + - 'skip-changelog' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +template: | + ## Changes + $CHANGES diff --git a/.github/workflows/label-verifier.yml b/.github/workflows/label-verifier.yml new file mode 100644 index 00000000..be7198b1 --- /dev/null +++ b/.github/workflows/label-verifier.yml @@ -0,0 +1,13 @@ +name: "Verify type labels" + +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +jobs: + triage: + runs-on: ubuntu-18.04 + steps: + - uses: zwaldowski/match-label-action@v2 + with: + allowed: 'bug, enhancement, new feature, documentation' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..2c30bcdb --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml new file mode 100644 index 00000000..7e8b8519 --- /dev/null +++ b/.github/workflows/scala.yml @@ -0,0 +1,44 @@ +name: Scala CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + scala: [2.11.12, 2.12.12, 2.13.3] + + steps: + - uses: actions/checkout@v2 + + - name: Cache jabba + uses: actions/cache@v1 + with: + path: ~/.jabba + key: ${{ runner.os }}-jabba-cache-${{ hashFiles('**/workflows/scala.yml') }} + + - name: Cache SBT ivy cache + uses: actions/cache@v1 + with: + path: ~/.ivy2/cache + key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }} + + - name: Cache SBT + uses: actions/cache@v1 + with: + path: ~/.sbt + key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} + + - uses: olafurpg/setup-scala@v5 + with: + java-version: graalvm@20.0.0 + + - name: Test + run: sbt ++${{matrix.scala}} test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2d0ccbf1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: scala - -scala: - - 2.11.12 - - 2.12.12 - - 2.13.3 - -cache: - directories: - - $HOME/.ivy2/cache - - $HOME/.sbt/boot diff --git a/README.md b/README.md index e6537fb0..4a3d5bcd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ | CI | Release | | --- | --- | -| [![Build Status](https://travis-ci.org/tethys-json/tethys.svg?branch=master)](https://travis-ci.org/manatki/derevo) | [![Maven Central](https://img.shields.io/maven-central/v/com.tethys-json/tethys-core_2.13.svg)](https://search.maven.org/search?q=com.tethys-json.tethys-json) | +| [![Build Status](https://github.com/tethys-json/tethys/workflows/Scala%20CI/badge.svg)](https://github.com/tethys-json/tethys/actions) | [![Maven Central](https://img.shields.io/maven-central/v/com.tethys-json/tethys-core_2.13.svg)](https://search.maven.org/search?q=com.tethys-json.tethys-json) | # tethys tethys is a JSON parsing/writing library for Scala