This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
Replace page-based pagination with cursor-based pagination in /ras/runs #110
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: PR build | |
on: | |
pull_request: | |
branches: [main] | |
env: | |
REGISTRY: ghcr.io | |
NAMESPACE: galasa-dev | |
jobs: | |
build-framework: | |
name: Build Framework using openapi2beans and gradle | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'semeru' | |
- name: Print githash | |
run: | | |
echo $GITHUB_SHA > ./framework.githash | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: 8.9 | |
- name: Build servlet beans with openapi2beans | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/${{env.NAMESPACE}}/openapi2beans:main generate --yaml var/workspace/${{ env.YAML_LOCATION }} --output var/workspace/${{ env.OUTPUT_LOCATION }} --package ${{ env.PACKAGE }} | |
env: | |
YAML_LOCATION: "galasa-parent/dev.galasa.framework.api.openapi/src/main/resources/openapi.yaml" # Update this path | |
OUTPUT_LOCATION: "galasa-parent/dev.galasa.framework.api.beans/src/main/java" | |
PACKAGE: "dev.galasa.framework.api.beans.generated" | |
- name: Build Framework source code | |
run: | | |
gradle -b galasa-parent/build.gradle check publish --info \ | |
-Dorg.gradle.jvmargs=-Xmx5120M \ | |
-PsourceMaven=https://development.galasa.dev/gh/maven-repo/maven/ \ | |
-PcentralMaven=https://repo.maven.apache.org/maven2/ \ | |
-PtargetMaven=${{ github.workspace }}/repo | |
- name: Build Framework image for testing | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: dockerfiles/dockerfile.framework | |
load: true | |
tags: framework:test | |
build-args: | | |
dockerRepository=ghcr.io | |
tag=main | |
build-rest-api-documentation: | |
name: Build REST API documentation using openapi2beans and gradle | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'semeru' | |
- name: Install Swagger CLI | |
run: | | |
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.41/swagger-codegen-cli-3.0.41.jar -O swagger-codegen-cli.jar | |
- name: Generate Swagger docs | |
run: | | |
java -jar swagger-codegen-cli.jar generate -i galasa-parent/dev.galasa.framework.api.openapi/src/main/resources/openapi.yaml -l html2 -o docs/generated/galasaapi | |
- name: Build Restapidoc image for testing | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: dockerfiles/dockerfile.restapidocsite | |
load: true | |
tags: restapidoc-site:test |