ProjectManagmentTool/.forgejo/workflows/qs.yml

97 lines
2.9 KiB
YAML
Raw Normal View History

2024-09-12 22:23:47 +00:00
name: "Quality Check"
on:
- push
- pull_request
jobs:
2024-09-12 22:59:37 +00:00
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-
2024-09-12 22:59:37 +00:00
- name: "Prepare Gradle"
run: gradle clean
- name: "Validate OAS Spec"
run: gradle validateSwagger
2024-09-12 22:23:47 +00:00
linting:
2024-09-12 22:59:37 +00:00
name: "Linting"
2024-09-12 22:23:47 +00:00
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-
2024-09-12 22:23:47 +00:00
- name: "Prepare Gradle"
run: gradle clean
2024-09-12 22:59:37 +00:00
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
2024-09-12 22:54:02 +00:00
- name: "Linting Main"
2024-09-12 22:23:47 +00:00
run: gradle checkstyleMain
2024-09-12 22:54:02 +00:00
- name: "Linting Test"
run: gradle checkstyleTest
2024-09-12 22:59:37 +00:00
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-
2024-09-12 22:59:37 +00:00
- name: "Prepare Gradle"
run: gradle clean
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
2024-09-12 22:54:02 +00:00
- name: "Static Analysis Main"
run: gradle spotbugsMain
- name: "Static Analysis Test"
2024-09-12 22:59:37 +00:00
run: gradle spotbugsTest
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-
2024-09-12 22:59:37 +00:00
- name: "Prepare Gradle"
run: gradle clean
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
- name: "Run Tests"
run: gradle test