-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11097 from swagger-api/issue-10040
Issue 10040
- Loading branch information
Showing
12 changed files
with
1,004 additions
and
13 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,156 @@ | ||
name: Test Framework V2 Typescript Angular v10 | ||
|
||
on: | ||
# execute on demand | ||
workflow_dispatch: | ||
branches: ["master"] | ||
|
||
jobs: | ||
|
||
# builds codegen cli and uploads its artifact | ||
build-codegen: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
java: [ 8 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: build codegen | ||
run: | | ||
mkdir codegen-cli | ||
echo "BUILDING ${{ env.VERSION }}" | ||
mvn -version | ||
mvn -q -B package -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3 | ||
cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli | ||
- name: upload codegen cli | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: codegen-cli | ||
path: codegen-cli | ||
|
||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
|
||
generate: | ||
|
||
needs: build-codegen | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
java: [ 8 ] | ||
|
||
|
||
outputs: | ||
generate_outcome: ${{ steps.outcome.outputs.generate_outcome }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: Download codegen cli | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: codegen-cli | ||
- name: generate | ||
id: generate | ||
continue-on-error: true | ||
uses: ./.github/actions/generate | ||
with: | ||
language: typescript-angular | ||
job-name: ${{ env.JOB_NAME }} | ||
spec-url: https://raw.githubusercontent.com/swagger-api/swagger-codegen/master/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml | ||
options: -DnpmName=@swagger/angular2-typescript-petstore,npmVersion=0.0.1,npmRepository=https://skimdb.npmjs.com/registry,snapshot=false,ngVersion=10.0.0 | ||
- id: outcome | ||
run: | | ||
echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}" | ||
echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }} | ||
- name: upload generate outcome | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generate_outcome | ||
path: generate_outcome_${{ env.JOB_NAME }} | ||
- name: upload generate logs | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generate_logs | ||
path: ${{ steps.generate.outputs.logs }} | ||
- name: upload generated code | ||
if: contains(steps.generate.outcome, 'success') | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generated | ||
path: ${{ steps.generate.outputs.path }} | ||
env: | ||
JOB_NAME: "typescript-angular-v10-v2-sample" | ||
|
||
build: | ||
|
||
needs: generate | ||
if: contains(needs.generate.outputs.generate_outcome, 'success') | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
############################################### | ||
##### DYNAMIC: Dependent on build environment | ||
############################################### | ||
matrix: | ||
node-version: [12.x] | ||
java: [ 8 ] | ||
############################################### | ||
##### END DYNAMIC: Dependent on build environment | ||
############################################### | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generated | ||
path: generated/${{ env.JOB_NAME }} | ||
- name: Download logs | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generate_logs | ||
############################################### | ||
##### DYNAMIC: Dependent on build environment | ||
############################################### | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
############################################### | ||
##### END DYNAMIC: Dependent on build environment | ||
############################################### | ||
- name: build | ||
id: build | ||
uses: ./.github/actions/build | ||
continue-on-error: true | ||
with: | ||
path: generated/${{ env.JOB_NAME }} | ||
job-name: ${{ env.JOB_NAME }} | ||
build-commands: "npm install -g @angular/cli__&&__npm install -g ng-packagr__&&__npm i__&&__ng-packagr -p ng-package.json" | ||
- id: outcome | ||
run: | | ||
echo "::set-output name=build_outcome::${{ steps.build.outcome }}" | ||
echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome | ||
- name: upload build outcome | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}build_outcome | ||
path: ${{ env.JOB_NAME }}build_outcome | ||
- name: upload logs | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}logs | ||
path: ${{ steps.build.outputs.logs }} | ||
env: | ||
LANGUAGE: ${{ github.event.inputs.language }} | ||
JOB_NAME: "typescript-angular-v10-v2-sample" |
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,156 @@ | ||
name: Test Framework V2 Typescript Angular v11 | ||
|
||
on: | ||
# execute on demand | ||
workflow_dispatch: | ||
branches: ["master"] | ||
|
||
jobs: | ||
|
||
# builds codegen cli and uploads its artifact | ||
build-codegen: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
java: [ 8 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: build codegen | ||
run: | | ||
mkdir codegen-cli | ||
echo "BUILDING ${{ env.VERSION }}" | ||
mvn -version | ||
mvn -q -B package -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3 | ||
cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli | ||
- name: upload codegen cli | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: codegen-cli | ||
path: codegen-cli | ||
|
||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
|
||
generate: | ||
|
||
needs: build-codegen | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
java: [ 8 ] | ||
|
||
|
||
outputs: | ||
generate_outcome: ${{ steps.outcome.outputs.generate_outcome }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: Download codegen cli | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: codegen-cli | ||
- name: generate | ||
id: generate | ||
continue-on-error: true | ||
uses: ./.github/actions/generate | ||
with: | ||
language: typescript-angular | ||
job-name: ${{ env.JOB_NAME }} | ||
spec-url: https://raw.githubusercontent.com/swagger-api/swagger-codegen/master/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml | ||
options: -DnpmName=@swagger/angular2-typescript-petstore,npmVersion=0.0.1,npmRepository=https://skimdb.npmjs.com/registry,snapshot=false,ngVersion=11.0.0 | ||
- id: outcome | ||
run: | | ||
echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}" | ||
echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }} | ||
- name: upload generate outcome | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generate_outcome | ||
path: generate_outcome_${{ env.JOB_NAME }} | ||
- name: upload generate logs | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generate_logs | ||
path: ${{ steps.generate.outputs.logs }} | ||
- name: upload generated code | ||
if: contains(steps.generate.outcome, 'success') | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generated | ||
path: ${{ steps.generate.outputs.path }} | ||
env: | ||
JOB_NAME: "typescript-angular-v11-v2-sample" | ||
|
||
build: | ||
|
||
needs: generate | ||
if: contains(needs.generate.outputs.generate_outcome, 'success') | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
############################################### | ||
##### DYNAMIC: Dependent on build environment | ||
############################################### | ||
matrix: | ||
node-version: [12.x] | ||
java: [ 8 ] | ||
############################################### | ||
##### END DYNAMIC: Dependent on build environment | ||
############################################### | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generated | ||
path: generated/${{ env.JOB_NAME }} | ||
- name: Download logs | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}generate_logs | ||
############################################### | ||
##### DYNAMIC: Dependent on build environment | ||
############################################### | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
############################################### | ||
##### END DYNAMIC: Dependent on build environment | ||
############################################### | ||
- name: build | ||
id: build | ||
uses: ./.github/actions/build | ||
continue-on-error: true | ||
with: | ||
path: generated/${{ env.JOB_NAME }} | ||
job-name: ${{ env.JOB_NAME }} | ||
build-commands: "npm install -g @angular/cli__&&__npm install -g ng-packagr__&&__npm i__&&__ng-packagr -p ng-package.json" | ||
- id: outcome | ||
run: | | ||
echo "::set-output name=build_outcome::${{ steps.build.outcome }}" | ||
echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome | ||
- name: upload build outcome | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}build_outcome | ||
path: ${{ env.JOB_NAME }}build_outcome | ||
- name: upload logs | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.JOB_NAME }}logs | ||
path: ${{ steps.build.outputs.logs }} | ||
env: | ||
LANGUAGE: ${{ github.event.inputs.language }} | ||
JOB_NAME: "typescript-angular-v11-v2-sample" |
Oops, something went wrong.