forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
samples-python-pydantic-v1-petstore.yaml
59 lines (53 loc) · 1.51 KB
/
samples-python-pydantic-v1-petstore.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: "Python Client: Petstore"
on:
pull_request:
paths:
- samples/openapi3/client/petstore/python-aiohttp/**
- samples/openapi3/client/petstore/python/**
- .github/workflows/samples-python-petstore.yaml
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
sample:
- samples/openapi3/client/petstore/python-aiohttp
- samples/openapi3/client/petstore/python
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
id: py
with:
python-version: ${{ matrix.python-version }}
- name: Cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
path: |
~/.cache/pypoetry/virtualenvs/
~/.local/pipx/venvs/poetry/
.mypy_cache/
- name: Install poetry
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
- name: Install
working-directory: ${{ matrix.sample }}
run: poetry install
- name: Test
working-directory: ${{ matrix.sample }}
run: poetry run pytest -v