Skip to content

Commit 945525c

Browse files
authored
Initial commit
0 parents  commit 945525c

16 files changed

+596
-0
lines changed

.github/workflows/ci.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python 3.8
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.8
20+
- name: Install
21+
run: |
22+
python3 -m venv .env
23+
source .env/bin/activate
24+
python -m pip install -U pip
25+
make install-dev
26+
- name: Lint
27+
run: |
28+
source .env/bin/activate
29+
make lint
30+
tests:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
python-version: [3.6, 3.7, 3.8]
35+
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
- name: Install
43+
run: |
44+
python3 -m venv .env
45+
source .env/bin/activate
46+
make install
47+
make install-dev
48+
- name: Unit tests
49+
run: |
50+
source .env/bin/activate
51+
make test
52+

.github/workflows/python-publish.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions-ecosystem/action-regex-match@v2
13+
id: regex-match
14+
with:
15+
text: ${{ github.event.head_commit.message }}
16+
regex: '^Release ([^ ]+)'
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.8'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Release
26+
if: ${{ steps.regex-match.outputs.match != '' }}
27+
uses: softprops/action-gh-release@v1
28+
with:
29+
tag_name: ${{ steps.regex-match.outputs.group1 }}
30+
- name: Build and publish
31+
if: ${{ steps.regex-match.outputs.match != '' }}
32+
env:
33+
TWINE_USERNAME: __token__
34+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
twine upload dist/*

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.egg-info
2+
.vscode
3+
.env
4+
__pycache__
5+
.envtest
6+
.coverage*
7+
.env*
8+
wandb
9+
*.pex
10+
.pexing

0 commit comments

Comments
 (0)