ProjectManagmentTool/.forgejo/workflows/qs.yml

111 lines
3.3 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
- name: "Stop Gradle"
run: gradle --stop
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
- name: "Stop Gradle"
run: gradle --stop
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
- name: "Stop Gradle"
run: gradle --stop
2024-09-12 22:59:37 +00:00
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
2024-09-30 14:24:36 +00:00
- name: Install Docker
run: |
rm $(which docker) && curl -fsSL https://get.docker.com | sh
2024-09-12 22:59:37 +00:00
- name: "Generate OAS Boilerplate"
run: gradle generateSwaggerCode
- name: "Run Tests"
run: gradle test
- name: "Stop Gradle"
run: gradle --stop