Skip to content

Commit

Permalink
Use a reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Jan 24, 2022
1 parent e97ecb9 commit 92ebac1
Showing 1 changed file with 15 additions and 79 deletions.
94 changes: 15 additions & 79 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,94 +11,30 @@ concurrency:
jobs:
check-code-style:
name: Check / Code Style
runs-on: ubuntu-20.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: Set up JDK 11
uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.11

- name: Cache Coursier cache
uses: coursier/cache-action@v6.2

- name: Code validations
run: sbt validateCode
uses: ihostage/.github/.github/workflows/ubuntu-sbt.yml@main
with:
command: sbt validateCode

check-binary-compatibility:
name: Check / Binary Compatibility
runs-on: ubuntu-20.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: Set up JDK 11
uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.11

- name: Cache Coursier cache
uses: coursier/cache-action@v6.2

- name: MiMa validations
run: sbt mimaReportBinaryIssues
uses: ihostage/.github/.github/workflows/ubuntu-sbt.yml@main
with:
command: sbt mimaReportBinaryIssues

check-docs:
name: Check / Docs
runs-on: ubuntu-20.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: Set up JDK 11
uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.11

- name: Cache Coursier cache
uses: coursier/cache-action@v6.2

- name: Docs validations
run: sbt docs/validateDocs
uses: ihostage/.github/.github/workflows/ubuntu-sbt.yml@main
with:
command: sbt docs/validateDocs

tests:
runs-on: ubuntu-20.04
name: Check / Tests
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
strategy:
matrix:
jdk: [ 11, 8 ]
scala: [ 2.12.15, 2.13.8, 3.0.2 ] # Should be sync with Mergify conditions (.mergify.yml)
name: Check / Tests (Scala ${{ matrix.scala }} & JDK ${{ matrix.jdk }})
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: Set up JDK ${{ matrix.jdk }}
uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.${{ matrix.jdk }}

- name: Cache Coursier cache
uses: coursier/cache-action@v6.2

- name: Tests
run: scripts/test-code.sh
env:
SCALA_VERSION: ${{ matrix.scala }}
uses: ihostage/.github/.github/workflows/ubuntu-sbt-matrix.yml@main
with:
java: "[ 11, 8 ]"
scala: "[ 2.12.15, 2.13.8, 3.0.2 ]" # Should be sync with Mergify conditions (.mergify.yml)
command: scripts/test-code.sh

0 comments on commit 92ebac1

Please sign in to comment.