ProjectManagmentTool/.forgejo/workflows/qs.yml
Ole Kück 7a1cd15552
Some checks failed
Quality Check / Testing (push) Failing after 52s
Quality Check / Validate OAS (push) Successful in 3m56s
Quality Check / Linting (push) Successful in 4m27s
Quality Check / Static Analysis (push) Successful in 4m31s
PMT-32: testing
2024-10-01 09:59:07 +02:00

111 lines
No EOL
3.3 KiB
YAML

name: "Quality Check"
on:
- push
- pull_request
jobs:
oas:
name: "Validate OAS"
runs-on: "ubuntu-latest"
container:
image: "git.euph.dev/actions/runner-java-21:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: "Prepare Gradle"
run: gradle clean
- name: "Validate OAS Spec"
run: gradle validateSwagger
- name: "Stop Gradle"
run: gradle --stop
linting:
name: "Linting"
runs-on: "ubuntu-latest"
container:
image: "git.euph.dev/actions/runner-java-21:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: "Prepare Gradle"
run: gradle clean
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
- name: "Linting Main"
run: gradle checkstyleMain
- name: "Linting Test"
run: gradle checkstyleTest
- name: "Stop Gradle"
run: gradle --stop
static:
name: "Static Analysis"
runs-on: "ubuntu-latest"
container:
image: "git.euph.dev/actions/runner-java-21:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: "Prepare Gradle"
run: gradle clean
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
- name: "Static Analysis Main"
run: gradle spotbugsMain
- name: "Static Analysis Test"
run: gradle spotbugsTest
- name: "Stop Gradle"
run: gradle --stop
test:
name: "Testing"
runs-on: "ubuntu-latest"
container:
image: "git.euph.dev/actions/runner-java-21:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: "Prepare Gradle"
run: gradle clean
- name: Install Docker
run: |
rm $(which docker) && curl -fsSL https://get.docker.com | sh
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
- name: "Run Tests"
run: gradle test
- name: "Stop Gradle"
run: gradle --stop