forked from loafle/openapi-generator-original
Add Gradle tests in Github actions (#10550)
* add github actions to test gradle * use bin/sh * remove branch name * trigger build failure * retest branch * Revert "retest branch" This reverts commitb121887ede. * Revert "trigger build failure" This reverts commitfce4d6f462.
This commit is contained in:
51
.github/workflows/gradle-test.yaml
vendored
Normal file
51
.github/workflows/gradle-test.yaml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Gradle tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
env:
|
||||
GRADLE_VERSION: 7.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Gradle tests
|
||||
runs-on: ubuntu-latest
|
||||
container: gradle:jdk8
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/java/jersey2-java8-localdatetime
|
||||
- samples/client/petstore/java/jersey2-java8
|
||||
- samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 8
|
||||
# Cache Gradle Dependencies
|
||||
- name: Setup Gradle Dependencies Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
|
||||
|
||||
# Cache Gradle Wrapper
|
||||
- name: Setup Gradle Wrapper Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: /bin/sh gradlew build -x test
|
||||
Reference in New Issue
Block a user