Skip to content

Commit a955bea

Browse files
authored
Migrate JS tests to Github workflows (#22077)
* update samples * fix name * update * remove * clean up test
1 parent d7b79a2 commit a955bea

File tree

4 files changed

+54
-68
lines changed

4 files changed

+54
-68
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Samples JS clients
2+
3+
on:
4+
push:
5+
paths:
6+
#- samples/client/petstore/javascript-flowtyped/**
7+
- samples/client/petstore/javascript-es6/**
8+
- samples/client/petstore/javascript-promise-es6/**
9+
pull_request:
10+
paths:
11+
#- samples/client/petstore/javascript-flowtyped/**
12+
- samples/client/petstore/javascript-es6/**
13+
- samples/client/petstore/javascript-promise-es6/**
14+
jobs:
15+
build:
16+
name: Build projects
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
node:
22+
- "18.x"
23+
- "20.x"
24+
sample:
25+
# clients
26+
- samples/client/petstore/javascript-es6/
27+
- samples/client/petstore/javascript-promise-es6/
28+
services:
29+
petstore-api:
30+
image: swaggerapi/petstore
31+
ports:
32+
- 80:8080
33+
env:
34+
SWAGGER_HOST: http://petstore.swagger.io
35+
SWAGGER_BASE_PATH: /v2
36+
steps:
37+
- uses: actions/checkout@v5
38+
- name: Add hosts to /etc/hosts
39+
run: |
40+
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
41+
- name: Use Node.js 20.x
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: ${{ matrix.node }}
45+
cache: 'npm' # Or 'yarn'
46+
- name: npm install
47+
working-directory: ${{ matrix.sample }}
48+
run: npm install
49+
- name: npm test
50+
working-directory: ${{ matrix.sample }}
51+
run: npm test

CI/circle_parallel.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ elif [ "$NODE_INDEX" = "3" ]; then
107107
(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
108108
(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
109109
(cd samples/client/petstore/typescript-axios/tests/with-complex-headers && mvn integration-test)
110-
(cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
111-
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
112-
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
113110
(cd samples/server/petstore/typescript-nestjs-server && mvn integration-test)
114111

115112
else

samples/client/petstore/javascript-es6/.openapi-generator-ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
#docs/*.md
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
24+
#
25+
#
26+
#

samples/client/petstore/javascript-es6/test/model/HealthCheckResult.spec.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)