Feature/devtooling 910 #124
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: OpenAPI Generator | |
on: | |
push: | |
branches: | |
- master | |
- '[5-9]+.[0-9]+.x' | |
pull_request: | |
branches: | |
- master | |
- '[5-9]+.[0-9]+.x' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Cache maven dependencies | |
uses: actions/cache@v2 | |
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 -Dorg.slf4j.simpleLogger.defaultLogLevel=error | |
- run: ls -la modules/openapi-generator-cli/target | |
- name: Upload openapi-generator-cli.jar artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: openapi-generator-cli.jar | |
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar | |
retention-days: 1 | |
test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Cache maven dependencies | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-maven-repository | |
with: | |
path: | | |
~/.m2/repository | |
~/.gradle | |
!~/.gradle/caches/*/plugin-resolution/ | |
!~/.m2/repository/org/openapitools/ | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
- name: Run unit tests | |
run: mvn --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error | |
- name: Publish unit test reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: surefire-test-results | |
path: '**/surefire-reports/TEST-*.xml' |