-
Notifications
You must be signed in to change notification settings - Fork 9
100 lines (80 loc) · 2.66 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: ci
on:
push: ~
pull_request: ~
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, pypy-3.6, pypy-3.7 ]
python-regex: [ True, False ]
steps:
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v2
- name: Git User config
run: |
git config --global user.email "action@github.com"
git config --global user.name "github-actions"
- name: Install Dependencies
run: |
pip install -e .[dev,test]
pip install coveralls
- name: Install regex
run: |
pip install regex
if: ${{ matrix.python-regex }}
- run: pylint rebulk
if: matrix.python-version != '3.9'
- run: coverage run --source=rebulk setup.py test
- run: python setup.py build
- name: Coveralls
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
release:
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.8 ]
steps:
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Git User config
run: |
git config --global user.email "action@github.com"
git config --global user.name "github-actions"
- name: Install Dependencies
run: pip install -e .[dev,test]
- name: Install python-semantic-release
run: pip install python-semantic-release
- name: Publish release
run: semantic-release -v DEBUG publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Merge master to develop
# uses: robotology/gh-action-nightly-merge@v1.3.1 # Wait PR merge https://github.com/robotology/gh-action-nightly-merge/pull/5
uses: Toilal/gh-action-nightly-merge@master
with:
stable_branch: 'master'
development_branch: 'develop'
allow_ff: true
user_name: github-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}