Updates #96
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
test-run: | |
description: 'Run Tests (y/n)?' | |
required: true | |
default: 'y' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
credit-api: | |
image: eliasnogueira/combined-credit-api:latest | |
ports: | |
- 8088:8088 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 23 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 23 | |
distribution: oracle | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Wait for the backend service to start | |
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/2.2.4/wait-for | sh -s -- http://localhost:8088/actuator/health -t 30 -- echo "Backend is up" | |
env: | |
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 | |
- name: Build with Maven | |
run: mvn -q -B -DskipTests package --file pom.xml | |
- name: Run Health Check Tests | |
run: mvn -q -B test -Dgroups="health" | |
- name: Run Contract Tests | |
run: mvn -q -B test -Dgroups="contract" | |
- name: Run E2E Tests | |
run: mvn -q -B test -Dgroups="e2e" | |
- name: Run Functional Tests | |
run: mvn -q -B test -Dgroups="functional" |