Staging #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Merge Workflow | |
on: | |
push: | |
branches: ["staging"] | |
pull_request: | |
branches: ["staging", "master"] | |
permissions: | |
contents: read | |
jobs: | |
check-code-formatting: | |
name: Check Code Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'sbt' | |
- name: Scalafmt Check | |
run: sbt scalafmtCheckAll | |
scalafix-check: | |
name: Scalafix Check | |
needs: check-code-formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'sbt' | |
- name: Run Scalafix Check | |
run: sbt "scalafixAll --check" | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run-unit-tests: | |
name: Run Unit Tests | |
needs: scalafix-check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'sbt' | |
- name: Run Unit Tests | |
run: sbt test | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |