-
Notifications
You must be signed in to change notification settings - Fork 9
109 lines (88 loc) · 2.84 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
101
102
103
104
105
106
107
108
109
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.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9", "pypy-3.10" ]
regex: [ "1", "0" ]
steps:
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v4
- name: Git User config
run: |
git config --global user.email "[email protected]"
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.regex == '1' }}
- run: pylint rebulk
- run: coverage run -m pytest
env:
REBULK_REGEX_ENABLED: ${{ matrix.regex }}
- run: python setup.py build
- name: Coveralls
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
commitlint:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
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.12 ]
steps:
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git User config
run: |
git config --global user.email "[email protected]"
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 publish -v DEBUG
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Merge master to develop
uses: robotology/[email protected]
with:
stable_branch: 'master'
development_branch: 'develop'
allow_ff: true
user_name: github-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}