Skip to content

Commit

Permalink
move basic checks to GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
octonato committed Apr 19, 2021
1 parent 184cbdb commit e372f44
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 9 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Basic checks

on:
pull_request:
push:
branches:
- master
tags-ignore: [ v.* ]

jobs:
check-code-style:
name: Check Code Style
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0

- name: Checkout GitHub merge
if: github.event.pull_request
run: |-
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5

- name: Code style check, compilation and binary-compatibility check
run: sbt "scalafmtCheckAll;+IntegrationTest/compile;mimaReportBinaryIssues"

check-docs:
name: Check Docs
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Checkout GitHub merge
if: github.event.pull_request
run: |-
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5

- name: Create all API docs for artifacts/website and all reference docs
run: sbt "unidoc; docs/paradox"
10 changes: 1 addition & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ before_script:
jobs:
include:
- stage: test
script:
- jabba use "[email protected]"
- git branch -f "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH"
- sbt -jvm-opts .jvmopts-travis ";scalafmtCheckAll;+Test/compile; mimaReportBinaryIssues; docs/paradox"
name: "Compile on all Scala versions, check code style (fixed with `sbt Test/compile`), run Mima"

- env: CMD="+test"
env: CMD="+test"
name: "Run tests on AdoptOpenJDK 8 (all Scala versions)"

- env:
Expand Down Expand Up @@ -79,8 +73,6 @@ jobs:
name: "Kubernetes Lease Integration tests"

stages:
- name: check
if: NOT tag =~ ^v
- name: test
if: NOT tag =~ ^v
- name: integration
Expand Down

0 comments on commit e372f44

Please sign in to comment.