Skip to content

Run Python tests during CI #7

Run Python tests during CI

Run Python tests during CI #7

Workflow file for this run

name: Samples Go
on:
push:
paths:
- 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**'
- 'samples/server/others/go-server/no-body-path-params/**'
pull_request:
paths:
- 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**'
- 'samples/server/others/go-server/no-body-path-params/**'
jobs:
build:
name: Build Go
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/go-echo-server/
- samples/server/petstore/go-api-server/
- samples/server/petstore/go-chi-server/
- samples/server/others/go-server/no-body-path-params/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- run: go version
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v
verify:
name: Verify generated Go files with Python tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/go-api-server/
python-version:
- "3.11"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r python/requirements.txt
pip install -r python/test-requirements.txt
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest