Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub Actions #744

Merged
merged 51 commits into from Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b9a55e1
Update and rename blank.yml to test.yml
xerial Sep 29, 2019
048c286
Add mroe jobs
xerial Sep 29, 2019
afd60c7
Fix Scala 2.13 test
xerial Sep 29, 2019
7e84f35
Use matrix
xerial Sep 29, 2019
61ffc0c
Revert "Use matrix"
xerial Sep 29, 2019
76957e7
Update test.yml
xerial Sep 29, 2019
8ef05c0
Update test.yml
xerial Sep 29, 2019
0f48141
Update test.yml
xerial Sep 29, 2019
c6fd8e2
Use codecov-action
xerial Sep 30, 2019
14ac558
fix
xerial Sep 30, 2019
5a0bff6
Trigger the workflow upon new PR
xerial Sep 30, 2019
cd21351
Add doc workflow
xerial Sep 30, 2019
5607334
Use setup-ruby action
xerial Sep 30, 2019
ce15cb4
Use github4s
xerial Sep 30, 2019
ffd2b4d
Restrict doc workflow only for master
xerial Sep 30, 2019
ec53104
Add snapshot workflow
xerial Sep 30, 2019
344e157
fix
xerial Sep 30, 2019
fc03e34
quote pass
xerial Sep 30, 2019
fed4a46
Use the default env
xerial Sep 30, 2019
07c7b53
Restrict snapshot release only for master
xerial Sep 30, 2019
f2aa657
Add release workflow
xerial Sep 30, 2019
3ed1bbc
Fix gpg import
xerial Sep 30, 2019
2777ef6
Fix config
xerial Sep 30, 2019
6ab953a
Fix env scope
xerial Sep 30, 2019
bd7ad64
Upgrade sbt-pgp
xerial Sep 30, 2019
96eeea8
Fix
xerial Sep 30, 2019
fc4acdc
Try merge steps
xerial Sep 30, 2019
6813735
Fix pgp key hex
xerial Sep 30, 2019
60c74f1
fix
xerial Sep 30, 2019
8cd261a
fix ci check
xerial Sep 30, 2019
fb09bb9
Downgrade sbt-pgp
xerial Sep 30, 2019
3dc4a7d
set tty for gpg
xerial Sep 30, 2019
a542e7b
Set GPG_TTY first
xerial Sep 30, 2019
70c14da
fix
xerial Sep 30, 2019
e37b8a7
fix
xerial Sep 30, 2019
0dfcfd2
fix gpg
xerial Sep 30, 2019
8aded35
fix gpg
xerial Sep 30, 2019
8f7ee07
fix gpg
xerial Sep 30, 2019
f4e2616
Fix
xerial Sep 30, 2019
84093f1
Fix
xerial Sep 30, 2019
c984a3d
Fix settings
xerial Sep 30, 2019
be067ca
Set key id
xerial Sep 30, 2019
0482006
Use different key
xerial Sep 30, 2019
01aa116
Add gpg settings
xerial Sep 30, 2019
8e69e68
Try custom built gpg
xerial Sep 30, 2019
25e0665
Use different key
xerial Sep 30, 2019
eca12c0
Run release workflow only for tagged commit
xerial Sep 30, 2019
7ce3c9c
Merge branch 'master' into gh-action
xerial Sep 30, 2019
f07d2d6
Fix release command name
xerial Sep 30, 2019
ca1cb14
Disable Travis build
xerial Sep 30, 2019
59dbf61
Disable patch coverage
xerial Oct 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codecov.yml
Expand Up @@ -8,6 +8,9 @@ coverage:
default:
target: 80%
threshold: 5%
patch:
default:
enabled: no

ignore:
- "**/*Macros.scala" # Scala Macros coverage cannot be evaluated
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/doc.yml
@@ -0,0 +1,28 @@
name: Doc

on:
push:
branches:
- master
paths:
- '*.md'
- 'docs/*'

jobs:
doc:
name: Update docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
- name: Install Jekyll
run: |
gem install sass
gem install jekyll -v 3.8.5
# TODO: Stop using GitHub4s as it's slower than direct push
- name: Publish doc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./sbt docs/publishMicrosite
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,46 @@
name: Release

on:
push:
branches:
- master
tags:
- 'v*'

jobs:
publish_jvm:
name: Publish Scala JVM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-gpg@v2 # Necessary for using GPG1
- name: Setup GPG
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
run: echo $PGP_SECRET | base64 --decode | gpg --import --batch --yes
- name: Build bundle
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
run: ./sbt "; + projectJVM2_13/publishSigned; + projectJVM2_12/publishSigned; sonatypeBundleRelease"
publish_js:
name: Publish Scala.js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-gpg@v2 # Necessary for using GPG1
- name: Setup GPG
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
run: echo $PGP_SECRET | base64 --decode | gpg --import --batch --yes
- name: Build for Scala.js 0.6.x
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: SCALA_JS_VERSION=0.6.29 ./sbt "projectJS/publishSigned"
- name: Build for Scala.js 1.0.x
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
run: SCALA_JS_VERSION=1.0.0-M8 ./sbt "; projectJS/publishSigned; sonatypeBundleRelease"
20 changes: 20 additions & 0 deletions .github/workflows/snapshot.yml
@@ -0,0 +1,20 @@
name: Snapshot Release

on:
push:
branches:
- master
tag:
- '!v*'

jobs:
publish_snapshots:
name: Publish snapshots
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Publish snapshots
env:
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
run: ./sbt publishSnapshots
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,47 @@
name: CI

on: [pull_request]

jobs:
code_format:
name: Code format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: scalafmt test
run: ./scalafmt --test
test_2_12:
name: Scala 2.12
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Scala 2.12 test with coverage test
run: ./sbt "; coverage; projectJVM/test; projectJVM/coverageReport"
- name: Generate a coverage report
run: ./sbt projectJVM/coverageAggregate
- uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}} #required
file: ./projectJVM/target/scala-2.12/scoverage-report/scoverage.xml

test_2_13:
name: Scala 2.13
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Scala 2.13 test
run: ./sbt ++2.13.1 projectJVM2_13/test
test_2_11:
name: Scala 2.11
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Scala 2.11 test
run: ./sbt ++2.11.12 projectJVM/test
test_js:
name: Scala.js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Scala.js test
run: ./sbt projectJS/test
File renamed without changes.
27 changes: 2 additions & 25 deletions build.sbt
Expand Up @@ -31,32 +31,9 @@ addCommandAlias(
scalaVersion in ThisBuild := SCALA_2_12
organization in ThisBuild := "org.wvlet.airframe"

val isTravisBuild: Boolean = sys.env.isDefinedAt("TRAVIS")

// Use dynamic snapshot version strings for non tagged versions
dynverSonatypeSnapshots in ThisBuild := true

// For publishing in Travis CI

lazy val travisSettings = List(
usePgpKeyHex("42575E0CCD6BA16A"),
pgpPublicRing := file("./travis/local.pubring.asc"),
pgpSecretRing := file("./travis/local.secring.asc"),
// PGP_PASS, SONATYPE_USER, SONATYPE_PASS are encoded in .travis.yml
pgpPassphrase := sys.env.get("PGP_PASS").map(_.toCharArray()),
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env.getOrElse("SONATYPE_USER", ""),
sys.env.getOrElse("SONATYPE_PASS", "")
)
)

inThisBuild(
if (isTravisBuild) travisSettings
else List.empty
)

val buildSettings = Seq[Setting[_]](
sonatypeProfileName := "org.wvlet",
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")),
Expand Down Expand Up @@ -265,8 +242,8 @@ lazy val docs =
micrositeDocumentationUrl := "docs",
micrositeGitterChannel := true,
micrositeGitterChannelUrl := "wvlet/airframe",
//micrositePushSiteWith := GitHub4s,
//micrositeGithubToken := sys.env.get("GITHUB_REPO_TOKEN"),
micrositePushSiteWith := GitHub4s,
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
micrositePalette ++= Map(
"brand-primary" -> "#2582AA",
"brand-secondary" -> "#143F56",
Expand Down
2 changes: 1 addition & 1 deletion project/plugin.sbt
@@ -1,5 +1,5 @@
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1-M3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.6")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")
Expand Down