SWI-3723 [Snyk] Fix for 3 vulnerabilities #20
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: 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: [11, 17] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
- name: Cache maven dependencies | |
uses: actions/cache@v4 | |
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: Setup Maven | |
uses: s4u/[email protected] | |
with: | |
java-version: ${{ matrix.java }} | |
maven-version: 3.8.8 | |
- name: Run maven | |
run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet install | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
- name: Test Template Retrieval | |
run: | | |
cd modules/openapi-generator-cli/target | |
# generator names containing "-" caused problems in the past, see https://github.com/OpenAPITools/openapi-generator/issues/9528 | |
java -jar ./openapi-generator-cli.jar author template --verbose -g jaxrs-spec --library quarkus | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Gradle tests | |
run: | | |
gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace |