From 4591274997a844f0e37e5dea61ea835a6bd7f4d0 Mon Sep 17 00:00:00 2001 From: "s.g.danilov" Date: Mon, 15 Feb 2021 08:58:36 +0300 Subject: [PATCH] Add test and publish in github Actions CI --- .github/workflows/scala.yml | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 11 ----------- README.md | 4 +++- project/plugins.sbt | 4 +--- publish.sbt | 7 ------- 5 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/scala.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml new file mode 100644 index 0000000..0198da9 --- /dev/null +++ b/.github/workflows/scala.yml @@ -0,0 +1,34 @@ +name: Build + +on: + pull_request: + push: + +jobs: + test: + name: Test and Publish Release + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.11 + + - name: Setup GPG + uses: olafurpg/setup-gpg@v3 + + - name: Test + run: sbt compile test + + - name: Publish Release + run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0880e42..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: scala - -jdk: - - openjdk11 - -jobs: - include: - - stage: Tests - name: Unit tests - script: - - sbt compile test \ No newline at end of file diff --git a/README.md b/README.md index 7e35945..51dc240 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ -# gatling-jdbc-plugin [![Build Status](https://travis-ci.com/TinkoffCreditSystems/gatling-jdbc-plugin.svg?branch=master)](https://travis-ci.com/TinkoffCreditSystems/gatling-jdbc-plugin) [![Maven Central](https://img.shields.io/maven-central/v/ru.tinkoff/gatling-jdbc-plugin_2.12.svg?color=success)](https://search.maven.org/search?q=ru.tinkoff.gatling-jdbc-plugin) +# gatling-jdbc-plugin +![Build](https://github.com/TinkoffCreditSystems/gatling-jdbc-plugin/workflows/Build/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/ru.tinkoff/gatling-jdbc-plugin_2.12.svg?color=success)](https://search.maven.org/search?q=ru.tinkoff.gatling-jdbc-plugin) + Simple gatling plugin for JDBC diff --git a/project/plugins.sbt b/project/plugins.sbt index 74015ef..58a199f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,2 @@ addSbtPlugin("io.gatling" % "gatling-sbt" % "3.2.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.4") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") \ No newline at end of file +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") \ No newline at end of file diff --git a/publish.sbt b/publish.sbt index 22ae960..d4a6fc5 100644 --- a/publish.sbt +++ b/publish.sbt @@ -3,13 +3,6 @@ ThisBuild / scalaVersion := "2.13.4" ThisBuild / publishMavenStyle := true -ThisBuild / publishTo := Some( - if (isSnapshot.value) - Opts.resolver.sonatypeSnapshots - else - Opts.resolver.sonatypeStaging -) - ThisBuild / scmInfo := Some( ScmInfo( url("https://github.com/TinkoffCreditSystems/gatling-jdbc-plugin"),