作者你好,python版增加自定义断言、json参数可整体用变量替换、csv中定义用例名,麻烦看下这样实现合理不 #888
Workflow file for this run
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: run smoke tests | |
on: | |
push: | |
branches: | |
- master | |
- v2 | |
- v3 | |
pull_request: | |
env: | |
DISABLE_GA: "true" | |
jobs: | |
smoke-test-httprunner: | |
name: smoketest - httprunner - ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
services: | |
service-httpbin: | |
image: kennethreitz/httpbin | |
ports: | |
- 80:80 | |
strategy: | |
fail-fast: false | |
max-parallel: 6 | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
os: [ubuntu-latest] # FIXME: docker services are not supported on macos-latest, windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
poetry --version | |
poetry install -vv -E upload | |
- name: Test build package | |
run: | | |
poetry build | |
ls -l dist/ | |
- name: Test commands | |
run: | | |
poetry run hrun -V | |
poetry run httprunner run -h | |
- name: Run smoketest - postman echo | |
run: | | |
poetry run hrun examples/postman_echo/request_methods | |
- name: Run smoketest - httpbin | |
run: | | |
poetry run hrun examples/httpbin/ | |
smoke-test-hrp: | |
name: smoketest - hrp - ${{ matrix.go-version }} on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: | |
- 1.18.x | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build hrp binary | |
run: make build | |
- name: Run smoketest - run with parameters | |
run: ./output/hrp run examples/hrp/parameters_test.json | |
- name: Run smoketest - boom with parameters | |
run: ./output/hrp boom examples/hrp/parameters_test.json --spawn-count 10 --spawn-rate 10 --loop-count 10 | |
- name: Run smoketest - boom with rendezvous | |
run: | | |
./output/hrp boom examples/hrp/rendezvous_test.json --spawn-count 10 --spawn-rate 10 --loop-count 10 | |
- name: Run hrp convert --pytest | |
run: ./output/hrp convert examples/postman_echo/request_methods/ | |
- name: Run hrp pytest | |
run: ./output/hrp pytest examples/postman_echo/request_methods/ |