Tests #674
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_run: | |
workflows: ["Generate"] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
test-csharp: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ">=1.14.0" | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "5.x" | |
- name: Test C# | |
run: |- | |
cd Tests | |
dotnet test | |
working-directory: ./csharp-client-sdk | |
test-go: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ">=1.14.0" | |
- name: Test Go | |
run: |- | |
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt -hide all | |
working-directory: ./go-client-sdk | |
test-java: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "corretto" | |
java-version: "11" | |
cache: "gradle" | |
- name: Test Java | |
run: |- | |
./gradlew test -p ./lib | |
working-directory: ./java-client-sdk | |
test-php: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
tools: composer | |
- name: Test PHP | |
run: |- | |
composer install | |
./vendor/bin/phpunit tests | |
working-directory: ./php-client-sdk | |
test-python: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Test Python | |
run: |- | |
python -m venv venv | |
. ./venv/bin/activate | |
pip install -e . | |
python -m pytest ./tests -vv | |
working-directory: ./python-client-sdk | |
test-ruby: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Test Ruby | |
run: |- | |
bundle install | |
rake test | |
working-directory: ./ruby-client-sdk | |
test-swift: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test Swift | |
run: |- | |
swift test | |
working-directory: ./swift-client-sdk | |
test-typescript: | |
runs-on: ubuntu-latest | |
services: | |
httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 35123:80 | |
speakeasy-api-test-service: | |
image: ghcr.io/speakeasy-api/speakeasy-api-test-service:latest | |
ports: | |
- 35456:8080 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Test Typescript | |
run: |- | |
npm install | |
npm run test | |
working-directory: ./typescript-client-sdk |