Skip to content

Commit 2bbde52

Browse files
committed
Add github workflows
1 parent 798f9c4 commit 2bbde52

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: ['*']
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
if: "!contains(github.event.head_commit.message, 'skip-ci')"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python 3.6
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.6'
19+
20+
- name: Install
21+
run: python3 -m pip install -r requirements/build.txt
22+
23+
- name: Lint
24+
run: make lint
25+
26+
- name: Test & Coverage
27+
run: make coverage
28+
29+
- name: Coveralls.io notification
30+
uses: AndreMiras/coveralls-python-action@develop
31+
with:
32+
parallel: true
33+
flag-name: Unit Test
34+
35+
coveralls_finish:
36+
needs: build
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Coveralls Finished
40+
uses: AndreMiras/coveralls-python-action@develop
41+
with:
42+
parallel-finished: true

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: deploy
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up Python 3.6
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.6'
17+
18+
- name: Install dependencies
19+
run: 'python -m pip install build wheel --user'
20+
21+
- name: Build
22+
run: make build
23+
24+
- name: Publish to PyPI
25+
uses: pypa/gh-action-pypi-publish@master
26+
with:
27+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/docs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [master, 3.x]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger RTDs build
12+
uses: dfm/rtds-action@v1
13+
with:
14+
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
15+
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
16+
commit_ref: ${{ github.ref }}

0 commit comments

Comments
 (0)