mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-24 16:21:14 -03:00
commit
5717abd4c0
@ -1,5 +1,5 @@
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
name: Test
|
name: Go Tests
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
@ -12,7 +12,6 @@ jobs:
|
|||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
|
|
||||||
- name: Set git on win to use LF
|
- name: Set git on win to use LF
|
||||||
run: |
|
run: |
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
@ -23,6 +22,7 @@ jobs:
|
|||||||
run: go test ./...
|
run: go test ./...
|
||||||
env:
|
env:
|
||||||
ENRY_DEBUG: 1
|
ENRY_DEBUG: 1
|
||||||
|
|
||||||
test-oniguruma:
|
test-oniguruma:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
27
.github/workflows/pyTest.yml
vendored
Normal file
27
.github/workflows/pyTest.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
on: [push, pull_request]
|
||||||
|
name: Python Tests
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [3.6, 3.7, 3.8]
|
||||||
|
platform: [ubuntu-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- name: Install Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r python/requirements.txt
|
||||||
|
if [ -f python/requirements.dev.txt ]; then pip install -r python/requirements.dev.txt; fi
|
||||||
|
- name: Build and install package
|
||||||
|
run: |
|
||||||
|
pip install -e python
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
pytest python/
|
@ -5,7 +5,8 @@ Python bindings through cFFI (API, out-of-line) for calling enry Go functions ex
|
|||||||
## Build
|
## Build
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd .. && make static
|
$ pushd .. && make static && popd
|
||||||
|
$ pip install -r requirments.txt
|
||||||
$ python build_enry.py
|
$ python build_enry.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ logger = getLogger(__name__)
|
|||||||
def build_go_archive():
|
def build_go_archive():
|
||||||
logger.info("Building C archive with static library")
|
logger.info("Building C archive with static library")
|
||||||
if shutil.which("go") is None:
|
if shutil.which("go") is None:
|
||||||
raise EnvironmentError("You should have go installed and available on your path in order to build this module")
|
raise EnvironmentError("You should have Go installed and available on your path in order to build this module")
|
||||||
subprocess.check_output(["make", "static"], cwd="../")
|
subprocess.check_output(["make", "static"], cwd="../")
|
||||||
logger.info("C archive successfully built")
|
logger.info("C archive successfully built")
|
||||||
|
|
||||||
@ -31,6 +31,9 @@ class build_static_and_install(install):
|
|||||||
super(build_static_and_install, self).run()
|
super(build_static_and_install, self).run()
|
||||||
|
|
||||||
|
|
||||||
|
with open("README.md", "r") as fh:
|
||||||
|
long_description = fh.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="enry",
|
name="enry",
|
||||||
version="0.1.1",
|
version="0.1.1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user