Skip to content

Commit 9438449

Browse files
Merge pull request #191 from pact-foundation/build-and-test-with-github-actions
ci(github actions): added Github Actions configuration for build and test
2 parents d6f02ca + 2796ef5 commit 9438449

File tree

4 files changed

+57
-39
lines changed

4 files changed

+57
-39
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Test
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.4, 3.5, 3.6, 3.7, 3.8]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements_dev.txt
23+
- name: Lint with flake8, pydocstyle
24+
run: |
25+
flake8
26+
pydocstyle pact
27+
- name: Test with nosetests
28+
run: |
29+
tox -e test
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
environment: "Upload Python Package"
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.x'
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install setuptools wheel twine
21+
- name: Build and publish
22+
env:
23+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
24+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
25+
run: |
26+
python setup.py sdist bdist_wheel
27+
twine upload dist/*

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# pact-python
22

33
[![slack](https://slack.pact.io/badge.svg)](https://slack.pact.io)
4-
[![Build Status](https://travis-ci.org/pact-foundation/pact-python.svg?branch=master)](https://travis-ci.org/pact-foundation/pact-python)
54
[![License](https://img.shields.io/github/license/pact-foundation/pact-python.svg?maxAge=2592000)](https://github.com/pact-foundation/pact-python/blob/master/LICENSE)
5+
![Build and Test](https://github.com/pact-foundation/pact-python/workflows/Build%20and%20Test/badge.svg)
66

77
Python version of Pact. Enables consumer driven contract testing,
88
providing a mock service and DSL for the consumer project, and

0 commit comments

Comments
 (0)