Skip to content

Commit 0a244a5

Browse files
committed
Initial commit
0 parents  commit 0a244a5

16 files changed

+1352
-0
lines changed

.github/workflows/publish.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Python package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.x'
16+
- name: Upgrade pip
17+
run: python -m pip install --upgrade pip
18+
- name: Install dependencies
19+
run: pip install setuptools wheel twine
20+
- name: Prepare data
21+
run: ./prepare.sh
22+
- name: Build
23+
run: python setup.py sdist bdist_wheel
24+
- name: Publish
25+
env:
26+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
27+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28+
run: twine upload dist/*

.github/workflows/test.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Python test
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '*.md'
7+
pull_request:
8+
paths-ignore:
9+
- '*.md'
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
strategy:
15+
matrix:
16+
python-version: [3.7, 3.8, 3.9]
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Upgrade pip
24+
run: python -m pip install --upgrade pip
25+
- name: Install PyTest
26+
run: pip install pytest
27+
# - name: Install Pylint
28+
# run: pip install pylint
29+
- name: Install package
30+
run: pip install .
31+
- name: Test
32+
run: pytest test/main.py
33+
# - name: Lint
34+
# run: pylint src test

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dist
2+
*.egg-info
3+
.mypy_cache
4+
.pytest_cache
5+
__pycache__
6+
.vscode
7+
/src/Qieyun/qieyun.csv
8+
/docs

0 commit comments

Comments
 (0)