1, migrate from travis CI to github actions;
2, migrate from coveralls to codecov.
This commit is contained in:
debugtalk
2019-12-13 23:28:21 +08:00
parent bc9ff4b52a
commit d67f950b33
8 changed files with 21 additions and 40 deletions

View File

@@ -3,7 +3,7 @@ name: integration_test
on: [push]
jobs:
build:
integration_test:
runs-on: ubuntu-latest
strategy:
@@ -22,7 +22,7 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry --version
poetry install -vvv
poetry install -vv
- name: Test package installation
run: |
poetry build

View File

@@ -3,7 +3,7 @@ name: unittest
on: [push]
jobs:
build:
unittest:
runs-on: ubuntu-latest
strategy:
@@ -22,23 +22,24 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry --version
poetry install -vvv
poetry install -vv
- name: Run unittest for httprunner
run: |
poetry run python -m httprunner.cli hrun -V
poetry run python -m httprunner.cli hrun -h
poetry run coverage run --source=httprunner -m unittest discover
poetry run coverage xml
poetry run coverage report -m
- name: Codecov
uses: codecov/codecov-action@v1.0.5
with:
# User defined upload name. Visible in Codecov UI
name: httprunner # optional
name: httprunner
# Repository upload token - get it from codecov.io
token: ${{ secrets.CODECOV_TOKEN }}
# Path to coverage file to upload
file: ./.coverage # optional
file: ./coverage.xml
# Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)
flags: unittests # optional
flags: unittests
# Specify whether or not CI build should fail if Codecov runs into an error during upload
fail_ci_if_error: true # optional
fail_ci_if_error: true

4
.gitignore vendored
View File

@@ -14,4 +14,6 @@ logs
locustfile.py
site/
reports
.venv
.venv
*.xml
htmlcov/

View File

@@ -1,26 +0,0 @@
sudo: false
language: python
python:
- 2.7
- 3.5
- 3.6
matrix:
include: # Required for Python 3.7+
- python: 3.7
dist: xenial
- python: 3.8
dist: xenial
install:
- pip install poetry
- poetry --version
- poetry install -vvv
- poetry build
- ls dist/*.whl | xargs pip install # test installation
script:
- hrun -V
- cd tests/httpbin && hrun basic.yml --failfast && cd -
- poetry run python -m httprunner.cli hrun -V
- poetry run python -m httprunner.cli hrun -h
- poetry run coverage run --source=httprunner -m unittest discover
after_success:
- poetry run coveralls

View File

@@ -2,8 +2,11 @@
# HttpRunner
[![downloads](https://pepy.tech/badge/httprunner)](https://pepy.tech/project/httprunner)
[![travis-ci](https://travis-ci.org/httprunner/httprunner.svg?branch=master)](https://travis-ci.org/httprunner/httprunner)
[![coveralls](https://coveralls.io/repos/github/HttpRunner/HttpRunner/badge.svg?branch=master)](https://coveralls.io/github/HttpRunner/HttpRunner?branch=master)
[![unittest](https://github.com/httprunner/httprunner/workflows/unittest/badge.svg
)](https://github.com/httprunner/httprunner/actions)
[![integration-test](https://github.com/httprunner/httprunner/workflows/integration_test/badge.svg
)](https://github.com/httprunner/httprunner/actions)
[![codecov](https://codecov.io/gh/httprunner/httprunner/branch/master/graph/badge.svg)](https://codecov.io/gh/httprunner/httprunner)
[![pypi version](https://img.shields.io/pypi/v/httprunner.svg)](https://pypi.python.org/pypi/httprunner)
[![pyversions](https://img.shields.io/pypi/pyversions/httprunner.svg)](https://pypi.python.org/pypi/httprunner)
[![TesterHome](https://img.shields.io/badge/TTF-TesterHome-2955C5.svg)](https://testerhome.com/github_statistics)

View File

@@ -5,6 +5,8 @@
**Changed**
- refactor: use poetry>=1.0.0
- test: migrate from travis CI to github actions
- test: migrate from coveralls to codecov
## 2.4.2 (2019-12-13)

View File

@@ -1,4 +1,4 @@
__version__ = "2.4.2"
__version__ = "2.4.3"
__description__ = "One-stop solution for HTTP(S) testing."
__all__ = ["__version__", "__description__"]

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "httprunner"
version = "2.4.2"
version = "2.4.3"
description = "One-stop solution for HTTP(S) testing."
license = "Apache-2.0"
readme = "README.md"
@@ -45,7 +45,6 @@ future = { version = "^0.18.1", python = "~2.7" }
[tool.poetry.dev-dependencies]
flask = "<1.0.0"
coverage = "^4.5.4"
coveralls = "^1.8.2"
[tool.poetry.scripts]
hrun = "httprunner.cli:main"