Skip to content

Commit 83b6e84

Browse files
committed
added typescript-angular workflows
1 parent 0b58916 commit 83b6e84

10 files changed

+1578
-0
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: Test Framework V3 Typescript Angular v10
2+
3+
on:
4+
# execute on demand
5+
workflow_dispatch:
6+
branches: ["master"]
7+
8+
jobs:
9+
10+
# builds codegen cli and uploads its artifact
11+
build-codegen:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
java: [ 8 ]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
ref: 3.0.0
23+
- uses: actions/setup-java@v1
24+
with:
25+
java-version: ${{ matrix.java }}
26+
- name: build codegen
27+
run: |
28+
mkdir codegen-cli
29+
echo "BUILDING ${{ env.VERSION }}"
30+
mvn -version
31+
mvn -q -B package -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3
32+
cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
33+
- name: upload codegen cli
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: codegen-cli
37+
path: codegen-cli
38+
39+
env:
40+
VERSION: ${{ github.event.inputs.version }}
41+
42+
generate:
43+
44+
needs: build-codegen
45+
46+
runs-on: ubuntu-latest
47+
48+
strategy:
49+
matrix:
50+
java: [ 8 ]
51+
52+
53+
outputs:
54+
generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
55+
56+
steps:
57+
- uses: actions/checkout@v2
58+
- uses: actions/setup-java@v1
59+
with:
60+
java-version: ${{ matrix.java }}
61+
- name: Download codegen cli
62+
uses: actions/download-artifact@v2
63+
with:
64+
name: codegen-cli
65+
- name: generate
66+
id: generate
67+
continue-on-error: true
68+
uses: ./.github/actions/generate
69+
with:
70+
language: typescript-angular
71+
job-name: ${{ env.JOB_NAME }}
72+
spec-url: https://raw.githubusercontent.com/swagger-api/swagger-codegen/master/3.0.0/swagger-codegen/src/test/resources/3_0_0/petstore.yaml
73+
options: " -DnpmName=@swagger/angular2-typescript-petstore,npmVersion=0.0.1,npmRepository=https://skimdb.npmjs.com/registry,snapshot=false,ngVersion=10.0.0"
74+
- id: outcome
75+
run: |
76+
echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
77+
echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
78+
- name: upload generate outcome
79+
uses: actions/upload-artifact@v2
80+
with:
81+
name: ${{ env.JOB_NAME }}generate_outcome
82+
path: generate_outcome_${{ env.JOB_NAME }}
83+
- name: upload generate logs
84+
uses: actions/upload-artifact@v2
85+
with:
86+
name: ${{ env.JOB_NAME }}generate_logs
87+
path: ${{ steps.generate.outputs.logs }}
88+
- name: upload generated code
89+
if: contains(steps.generate.outcome, 'success')
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: ${{ env.JOB_NAME }}generated
93+
path: ${{ steps.generate.outputs.path }}
94+
env:
95+
JOB_NAME: "typescript-angular-v10-v3-sample"
96+
97+
build:
98+
99+
needs: generate
100+
if: contains(needs.generate.outputs.generate_outcome, 'success')
101+
runs-on: ubuntu-latest
102+
103+
strategy:
104+
###############################################
105+
##### DYNAMIC: Dependent on build environment
106+
###############################################
107+
matrix:
108+
node-version: [12.x]
109+
java: [ 8 ]
110+
###############################################
111+
##### END DYNAMIC: Dependent on build environment
112+
###############################################
113+
steps:
114+
- uses: actions/checkout@v2
115+
- name: Download artifacts
116+
uses: actions/download-artifact@v2
117+
with:
118+
name: ${{ env.JOB_NAME }}generated
119+
path: generated/${{ env.JOB_NAME }}
120+
- name: Download logs
121+
uses: actions/download-artifact@v2
122+
with:
123+
name: ${{ env.JOB_NAME }}generate_logs
124+
###############################################
125+
##### DYNAMIC: Dependent on build environment
126+
###############################################
127+
- name: Use Node.js ${{ matrix.node-version }}
128+
uses: actions/setup-node@v1
129+
with:
130+
node-version: ${{ matrix.node-version }}
131+
###############################################
132+
##### END DYNAMIC: Dependent on build environment
133+
###############################################
134+
- name: build
135+
id: build
136+
uses: ./.github/actions/build
137+
continue-on-error: true
138+
with:
139+
path: generated/${{ env.JOB_NAME }}
140+
job-name: ${{ env.JOB_NAME }}
141+
build-commands: "npm install -g @angular/cli__&&__npm install -g ng-packagr__&&__npm i__&&__npm run build"
142+
- id: outcome
143+
run: |
144+
echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
145+
echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
146+
- name: upload build outcome
147+
uses: actions/upload-artifact@v2
148+
with:
149+
name: ${{ env.JOB_NAME }}build_outcome
150+
path: ${{ env.JOB_NAME }}build_outcome
151+
- name: upload logs
152+
uses: actions/upload-artifact@v2
153+
with:
154+
name: ${{ env.JOB_NAME }}logs
155+
path: ${{ steps.build.outputs.logs }}
156+
env:
157+
JOB_NAME: "typescript-angular-v10-v3-sample"
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: Test Framework V3 Typescript Angular v11
2+
3+
on:
4+
# execute on demand
5+
workflow_dispatch:
6+
branches: ["master"]
7+
8+
jobs:
9+
10+
# builds codegen cli and uploads its artifact
11+
build-codegen:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
java: [ 8 ]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
ref: 3.0.0
23+
- uses: actions/setup-java@v1
24+
with:
25+
java-version: ${{ matrix.java }}
26+
- name: build codegen
27+
run: |
28+
mkdir codegen-cli
29+
echo "BUILDING ${{ env.VERSION }}"
30+
mvn -version
31+
mvn -q -B package -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3
32+
cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
33+
- name: upload codegen cli
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: codegen-cli
37+
path: codegen-cli
38+
39+
env:
40+
VERSION: ${{ github.event.inputs.version }}
41+
42+
generate:
43+
44+
needs: build-codegen
45+
46+
runs-on: ubuntu-latest
47+
48+
strategy:
49+
matrix:
50+
java: [ 8 ]
51+
52+
53+
outputs:
54+
generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
55+
56+
steps:
57+
- uses: actions/checkout@v2
58+
- uses: actions/setup-java@v1
59+
with:
60+
java-version: ${{ matrix.java }}
61+
- name: Download codegen cli
62+
uses: actions/download-artifact@v2
63+
with:
64+
name: codegen-cli
65+
- name: generate
66+
id: generate
67+
continue-on-error: true
68+
uses: ./.github/actions/generate
69+
with:
70+
language: typescript-angular
71+
job-name: ${{ env.JOB_NAME }}
72+
spec-url: https://raw.githubusercontent.com/swagger-api/swagger-codegen/master/3.0.0/swagger-codegen/src/test/resources/3_0_0/petstore.yaml
73+
options: " -DnpmName=@swagger/angular2-typescript-petstore,npmVersion=0.0.1,npmRepository=https://skimdb.npmjs.com/registry,snapshot=false,ngVersion=11.0.0"
74+
- id: outcome
75+
run: |
76+
echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
77+
echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
78+
- name: upload generate outcome
79+
uses: actions/upload-artifact@v2
80+
with:
81+
name: ${{ env.JOB_NAME }}generate_outcome
82+
path: generate_outcome_${{ env.JOB_NAME }}
83+
- name: upload generate logs
84+
uses: actions/upload-artifact@v2
85+
with:
86+
name: ${{ env.JOB_NAME }}generate_logs
87+
path: ${{ steps.generate.outputs.logs }}
88+
- name: upload generated code
89+
if: contains(steps.generate.outcome, 'success')
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: ${{ env.JOB_NAME }}generated
93+
path: ${{ steps.generate.outputs.path }}
94+
env:
95+
JOB_NAME: "typescript-angular-v11-v3-sample"
96+
97+
build:
98+
99+
needs: generate
100+
if: contains(needs.generate.outputs.generate_outcome, 'success')
101+
runs-on: ubuntu-latest
102+
103+
strategy:
104+
###############################################
105+
##### DYNAMIC: Dependent on build environment
106+
###############################################
107+
matrix:
108+
node-version: [12.x]
109+
java: [ 8 ]
110+
###############################################
111+
##### END DYNAMIC: Dependent on build environment
112+
###############################################
113+
steps:
114+
- uses: actions/checkout@v2
115+
- name: Download artifacts
116+
uses: actions/download-artifact@v2
117+
with:
118+
name: ${{ env.JOB_NAME }}generated
119+
path: generated/${{ env.JOB_NAME }}
120+
- name: Download logs
121+
uses: actions/download-artifact@v2
122+
with:
123+
name: ${{ env.JOB_NAME }}generate_logs
124+
###############################################
125+
##### DYNAMIC: Dependent on build environment
126+
###############################################
127+
- name: Use Node.js ${{ matrix.node-version }}
128+
uses: actions/setup-node@v1
129+
with:
130+
node-version: ${{ matrix.node-version }}
131+
###############################################
132+
##### END DYNAMIC: Dependent on build environment
133+
###############################################
134+
- name: build
135+
id: build
136+
uses: ./.github/actions/build
137+
continue-on-error: true
138+
with:
139+
path: generated/${{ env.JOB_NAME }}
140+
job-name: ${{ env.JOB_NAME }}
141+
build-commands: "npm install -g @angular/cli__&&__npm install -g ng-packagr__&&__npm i__&&__npm run build"
142+
- id: outcome
143+
run: |
144+
echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
145+
echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
146+
- name: upload build outcome
147+
uses: actions/upload-artifact@v2
148+
with:
149+
name: ${{ env.JOB_NAME }}build_outcome
150+
path: ${{ env.JOB_NAME }}build_outcome
151+
- name: upload logs
152+
uses: actions/upload-artifact@v2
153+
with:
154+
name: ${{ env.JOB_NAME }}logs
155+
path: ${{ steps.build.outputs.logs }}
156+
env:
157+
JOB_NAME: "typescript-angular-v11-v3-sample"

0 commit comments

Comments
 (0)