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
This commit is contained in:
William Cheng 2025-09-21 00:32:44 +08:00 committed by GitHub
parent f1a273de16
commit 71a6901d1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 54 additions and 1 deletions

51
.github/workflows/samples-clojure.yaml vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -21,3 +21,6 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
#
#
#