-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to test builds and Gradle plugin on Windows (#15562)
* add workflow to test builds on windows * fix gradle
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Windows tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '[5-9]+.[0-9]+.x' | ||
pull_request: | ||
branches: | ||
- master | ||
- '[5-9]+.[0-9]+.x' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
java: [8, 11] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'temurin' | ||
- name: Cache maven dependencies | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-maven-repository | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gradle | ||
!~/.gradle/caches/*/plugin-resolution/ | ||
!~/.m2/repository/org/openapitools/ | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
- name: Run maven | ||
run: mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Gradle tests | ||
run: | | ||
gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace |