Block Henri #4082
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: Backend CI | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- "main" | |
- "staging" | |
- "production" | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
required: false | |
default: false | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Setup Maven | |
uses: s4u/[email protected] | |
- run: ./mvnw clean install -T 4 -DskipTests -DskipITs -DskipUTs | |
unit_tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- run: ./mvnw test -T 6 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/target/site/jacoco-aggregate/jacoco.xml | |
flags: unit_tests | |
integration_tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ Accounting, BO, Concurrency, Me, Project, Reward, User, BI, Others, Postgres ] | |
name: ITs [${{ matrix.suite }}] | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- run: ./mvnw verify -Dfailsafe-include='**/${{ matrix.suite }}Suite.java' -DskipUTs=true -T 6 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/target/site/jacoco-aggregate/jacoco.xml | |
flags: integration_tests |