PF-2033, PF-2989: Trigger Unit Tests On PR Commits #1
Workflow file for this run
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: Build and Test | |
on: | |
push: | |
branches: [ develop ] | |
paths-ignore: [ '*.md' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Build with Gradle | |
# TODO: Spotbugs references can be removed once | |
# https://github.com/DataBiosphere/stairway/pull/115 is merged | |
run: ./gradlew build -x test -x spotBugsMain -x spotBugsTest | |
unit-tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
# Default values stairway expects based on DEVELOPMENT.md | |
POSTGRES_PASSWORD: stairwaypw | |
POSTGRES_USER: stairwayuser | |
POSTGRES_DB: stairwaylib | |
ports: [ "5432:5432" ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Run tests | |
run: ./gradlew test | |