From 71a6901d1ef03a30b5ed9d0f1541b51a8c07e543 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 21 Sep 2025 00:32:44 +0800 Subject: [PATCH] Add GitHub workflow to test Clojure client (#22004) * add workflow to test clojure client; * add file * run tests * remove server * Revert "remove server" This reverts commit bda91432197b0b62d928839f08d82b0e41673f3a. * clean up circleci --- .github/workflows/samples-clojure.yaml | 51 +++++++++++++++++++ CI/circle_parallel.sh | 1 - .../clojure/.openapi-generator-ignore | 3 ++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/samples-clojure.yaml diff --git a/.github/workflows/samples-clojure.yaml b/.github/workflows/samples-clojure.yaml new file mode 100644 index 00000000000..ae493e77d6e --- /dev/null +++ b/.github/workflows/samples-clojure.yaml @@ -0,0 +1,51 @@ +name: Samples Clojure Client + +on: + push: + paths: + - samples/client/petstore/clojure/** + pull_request: + paths: + - samples/client/petstore/clojure/** +jobs: + build: + name: Build Clojure Client (JDK11) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - samples/client/petstore/clojure/ + services: + petstore-api: + image: swaggerapi/petstore + ports: + - 80:8080 + env: + SWAGGER_HOST: http://petstore.swagger.io + SWAGGER_BASE_PATH: /v2 + steps: + - uses: actions/checkout@v5 + - name: Add hosts to /etc/hosts + run: | + sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts + - uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: 11 + - name: Cache maven dependencies + uses: actions/cache@v4 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Install Leiningen (if using Leiningen) + run: | + curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > lein + chmod +x lein + sudo mv lein /usr/local/bin/ + - name: Run tests (Leiningen) + working-directory: ${{ matrix.sample }} + run: lein test diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 36ce7d15186..d7cd03c5686 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -120,6 +120,5 @@ else (cd samples/client/petstore/scala-sttp && mvn integration-test) (cd samples/client/petstore/scala-sttp-circe && mvn integration-test) (cd samples/client/petstore/scala-sttp4 && mvn integration-test) - (cd samples/client/petstore/clojure && mvn integration-test) fi diff --git a/samples/client/petstore/clojure/.openapi-generator-ignore b/samples/client/petstore/clojure/.openapi-generator-ignore index 7484ee590a3..c5b04829c20 100644 --- a/samples/client/petstore/clojure/.openapi-generator-ignore +++ b/samples/client/petstore/clojure/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +# +# +#