mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 15:31:23 +08:00
Create unittest.yml
add github action for unittest.
This commit is contained in:
39
.github/workflows/unittest.yml
vendored
Normal file
39
.github/workflows/unittest.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Python package
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
max-parallel: 5
|
||||||
|
matrix:
|
||||||
|
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install poetry
|
||||||
|
poetry --version
|
||||||
|
poetry install -vvv
|
||||||
|
- name: Test package installation
|
||||||
|
run: |
|
||||||
|
poetry build
|
||||||
|
ls dist/*.whl | xargs pip install # test installation
|
||||||
|
hrun -V
|
||||||
|
- name: Smoketest for hrun command
|
||||||
|
run: |
|
||||||
|
cd tests/httpbin && hrun basic.yml --log-level debug --failfast && cd -
|
||||||
|
- name: Smoketest for hrun command
|
||||||
|
run: |
|
||||||
|
python -m httprunner.cli hrun -V
|
||||||
|
python -m httprunner.cli hrun -h
|
||||||
|
poetry run coverage run --source=httprunner -m unittest discover
|
||||||
|
poetry run coveralls
|
||||||
Reference in New Issue
Block a user