|
| 1 | +name: Samples TS clients |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - samples/client/others/typescript-angular/** |
| 7 | + # comment out angular released before Nov 2023 |
| 8 | + #- samples/client/petstore/typescript-angular-v12-provided-in-root/** |
| 9 | + #- samples/client/petstore/typescript-angular-v13-provided-in-root/** |
| 10 | + #- samples/client/petstore/typescript-angular-v14-provided-in-root/** |
| 11 | + #- samples/client/petstore/typescript-angular-v15-provided-in-root/** |
| 12 | + - samples/client/petstore/typescript-angular-v16-provided-in-root/** |
| 13 | + - samples/client/petstore/typescript-angular-v17-provided-in-root/** |
| 14 | + - samples/client/petstore/typescript-angular-v18-provided-in-root/** |
| 15 | + - samples/client/petstore/typescript-angular-v19-provided-in-root/** |
| 16 | + - samples/client/petstore/typescript-angular-v20-provided-in-root/** |
| 17 | + - samples/openapi3/client/petstore/typescript/builds/default/** |
| 18 | + # comment out due to build failure |
| 19 | + #- samples/openapi3/client/petstore/typescript/tests/default/** |
| 20 | + - samples/openapi3/client/petstore/typescript/builds/jquery/** |
| 21 | + # comment out due to build failure |
| 22 | + #- samples/openapi3/client/petstore/typescript/tests/jquery/** |
| 23 | + - samples/openapi3/client/petstore/typescript/builds/object_params/** |
| 24 | + # comment out due to build failure |
| 25 | + #- samples/openapi3/client/petstore/typescript/tests/object_params/** |
| 26 | + #- samples/openapi3/client/petstore/typescript/builds/inversify/** |
| 27 | + #- samples/openapi3/client/petstore/typescript/tests/inversify/** |
| 28 | + #- samples/openapi3/client/petstore/typescript/tests/deno/** |
| 29 | + - samples/openapi3/client/petstore/typescript/builds/browser/** |
| 30 | + # comment out due to build failure |
| 31 | + #- samples/openapi3/client/petstore/typescript/tests/browser/** |
| 32 | + #- samples/openapi3/client/petstore/typescript/builds/nullable-enum/** |
| 33 | + - samples/client/petstore/typescript-fetch/builds/default/** |
| 34 | + - samples/client/petstore/typescript-fetch/builds/es6-target/** |
| 35 | + - samples/client/petstore/typescript-fetch/builds/with-npm-version/** |
| 36 | + - samples/client/petstore/typescript-fetch/tests/default/** |
| 37 | + # comment out due to build failure |
| 38 | + #- samples/client/petstore/typescript-node/npm/** |
| 39 | + - samples/client/petstore/typescript-rxjs/builds/with-npm-version/** |
| 40 | + - samples/client/petstore/typescript-axios/builds/with-npm-version/** |
| 41 | + # comment out due to build failure |
| 42 | + #- samples/client/petstore/typescript-axios/tests/default/** |
| 43 | + pull_request: |
| 44 | + paths: |
| 45 | + - samples/client/others/typescript-angular/** |
| 46 | + #- samples/client/petstore/typescript-angular-v12-provided-in-root/** |
| 47 | + #- samples/client/petstore/typescript-angular-v13-provided-in-root/** |
| 48 | + #- samples/client/petstore/typescript-angular-v14-provided-in-root/** |
| 49 | + #- samples/client/petstore/typescript-angular-v15-provided-in-root/** |
| 50 | + - samples/client/petstore/typescript-angular-v16-provided-in-root/** |
| 51 | + - samples/client/petstore/typescript-angular-v17-provided-in-root/** |
| 52 | + - samples/client/petstore/typescript-angular-v18-provided-in-root/** |
| 53 | + - samples/client/petstore/typescript-angular-v19-provided-in-root/** |
| 54 | + - samples/client/petstore/typescript-angular-v20-provided-in-root/** |
| 55 | + - samples/openapi3/client/petstore/typescript/builds/default/** |
| 56 | + #- samples/openapi3/client/petstore/typescript/tests/default/** |
| 57 | + - samples/openapi3/client/petstore/typescript/builds/jquery/** |
| 58 | + #- samples/openapi3/client/petstore/typescript/tests/jquery/** |
| 59 | + - samples/openapi3/client/petstore/typescript/builds/object_params/** |
| 60 | + #- samples/openapi3/client/petstore/typescript/tests/object_params/** |
| 61 | + #- samples/openapi3/client/petstore/typescript/builds/inversify/** |
| 62 | + #- samples/openapi3/client/petstore/typescript/tests/inversify/** |
| 63 | + #- samples/openapi3/client/petstore/typescript/tests/deno/** |
| 64 | + - samples/openapi3/client/petstore/typescript/builds/browser/** |
| 65 | + #- samples/openapi3/client/petstore/typescript/tests/browser/** |
| 66 | + #- samples/openapi3/client/petstore/typescript/builds/nullable-enum/** |
| 67 | + - samples/client/petstore/typescript-fetch/builds/default/** |
| 68 | + - samples/client/petstore/typescript-fetch/builds/es6-target/** |
| 69 | + - samples/client/petstore/typescript-fetch/builds/with-npm-version/** |
| 70 | + - samples/client/petstore/typescript-fetch/tests/default/** |
| 71 | + #- samples/client/petstore/typescript-node/npm/** |
| 72 | + - samples/client/petstore/typescript-rxjs/builds/with-npm-version/** |
| 73 | + - samples/client/petstore/typescript-axios/builds/with-npm-version/** |
| 74 | + #- samples/client/petstore/typescript-axios/tests/default/** |
| 75 | +jobs: |
| 76 | + build: |
| 77 | + name: Build projects |
| 78 | + runs-on: ubuntu-latest |
| 79 | + services: |
| 80 | + petstore-api: |
| 81 | + image: swaggerapi/petstore |
| 82 | + ports: |
| 83 | + - 80:8080 |
| 84 | + env: |
| 85 | + SWAGGER_HOST: http://petstore.swagger.io |
| 86 | + SWAGGER_BASE_PATH: /v2 |
| 87 | + strategy: |
| 88 | + fail-fast: false |
| 89 | + matrix: |
| 90 | + node: |
| 91 | + #- "18.x" |
| 92 | + - "20.x" |
| 93 | + sample: |
| 94 | + - samples/client/others/typescript-angular/ |
| 95 | + #- samples/client/petstore/typescript-angular-v12-provided-in-root/ |
| 96 | + #- samples/client/petstore/typescript-angular-v13-provided-in-root/ |
| 97 | + #- samples/client/petstore/typescript-angular-v14-provided-in-root/ |
| 98 | + #- samples/client/petstore/typescript-angular-v15-provided-in-root/ |
| 99 | + - samples/client/petstore/typescript-angular-v16-provided-in-root/ |
| 100 | + - samples/client/petstore/typescript-angular-v17-provided-in-root/ |
| 101 | + - samples/client/petstore/typescript-angular-v18-provided-in-root/ |
| 102 | + - samples/client/petstore/typescript-angular-v19-provided-in-root/ |
| 103 | + - samples/client/petstore/typescript-angular-v20-provided-in-root/ |
| 104 | + - samples/openapi3/client/petstore/typescript/builds/default/ |
| 105 | + #- samples/openapi3/client/petstore/typescript/tests/default/ |
| 106 | + - samples/openapi3/client/petstore/typescript/builds/jquery/ |
| 107 | + #- samples/openapi3/client/petstore/typescript/tests/jquery/ |
| 108 | + - samples/openapi3/client/petstore/typescript/builds/object_params/ |
| 109 | + #- samples/openapi3/client/petstore/typescript/tests/object_params/ |
| 110 | + #- samples/openapi3/client/petstore/typescript/builds/inversify/ |
| 111 | + #- samples/openapi3/client/petstore/typescript/tests/inversify/ |
| 112 | + #- samples/openapi3/client/petstore/typescript/tests/deno/ |
| 113 | + - samples/openapi3/client/petstore/typescript/builds/browser/ |
| 114 | + #- samples/openapi3/client/petstore/typescript/tests/browser/ |
| 115 | + #- samples/openapi3/client/petstore/typescript/builds/nullable-enum/ |
| 116 | + - samples/client/petstore/typescript-fetch/builds/default/ |
| 117 | + - samples/client/petstore/typescript-fetch/builds/es6-target/ |
| 118 | + - samples/client/petstore/typescript-fetch/builds/with-npm-version/ |
| 119 | + - samples/client/petstore/typescript-fetch/tests/default/ |
| 120 | + #- samples/client/petstore/typescript-node/npm/ |
| 121 | + - samples/client/petstore/typescript-rxjs/builds/with-npm-version/ |
| 122 | + - samples/client/petstore/typescript-axios/builds/with-npm-version/ |
| 123 | + #- samples/client/petstore/typescript-axios/tests/default/ |
| 124 | + steps: |
| 125 | + - uses: actions/checkout@v5 |
| 126 | + - name: Add hosts to /etc/hosts |
| 127 | + run: | |
| 128 | + sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts |
| 129 | + - name: Set up JDK 17 |
| 130 | + uses: actions/setup-java@v5 |
| 131 | + with: |
| 132 | + java-version: '17' # Specify your desired Java version |
| 133 | + distribution: 'temurin' # Or 'adopt', 'oracle', etc. |
| 134 | + cache: maven # Cache Maven dependencies for faster builds |
| 135 | + - name: Use Node.js |
| 136 | + uses: actions/setup-node@v5 |
| 137 | + with: |
| 138 | + node-version: ${{ matrix.node }} |
| 139 | + cache: 'npm' # Or 'yarn' |
| 140 | + - name: mvn integration-test |
| 141 | + working-directory: ${{ matrix.sample }} |
| 142 | + run: mvn integration-test |
0 commit comments