Skip to content

Commit 12270ef

Browse files
authored
Merge pull request #27 from hideaki-t/update_actions
Update actions
2 parents b21213c + ba3cf85 commit 12270ef

File tree

1 file changed

+58
-62
lines changed

1 file changed

+58
-62
lines changed

.github/workflows/package.yml

Lines changed: 58 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,58 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
4-
name: Python package
5-
6-
on: [push]
7-
# push:
8-
# branches: [ master ]
9-
# pull_request:
10-
# branches: [ master ]
11-
12-
jobs:
13-
build:
14-
runs-on: ${{ matrix.platform }}
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
platform: [ubuntu-latest, macos-latest, windows-latest]
19-
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-2.7", "pypy-3.8"]
20-
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
- name: Install native deps (Linux)
30-
if: runner.os == 'Linux'
31-
run: |
32-
sudo apt install -y mecab libmecab-dev mecab-ipadic-utf8
33-
- name: Test with pytest (Windows & Py27/35)
34-
if: runner.os == 'Windows' && (matrix.python-version == '2.7' || matrix.python-version == '3.5')
35-
shell: bash
36-
run: |
37-
pip install pathlib
38-
curl -fsSL -o sqlite_dll.zip https://www.sqlite.org/2021/sqlite-dll-win64-x64-3370000.zip
39-
7z x sqlite_dll.zip sqlite3.dll
40-
cp -v $(python -c "import sys, pathlib; print([x for x in map(pathlib.Path, sys.path) if x.name == 'DLLs'][0]/'_sqlite3.pyd')") .
41-
pip install pytest faker igo-python "janome<0.4" tinysegmenter
42-
pip install -e .
43-
python -m pytest -svra tests
44-
- name: Test with tox
45-
if: runner.os == 'Linux' || (runner.os == 'Windows' && (matrix.python-version != '2.7' && matrix.python-version != '3.5'))
46-
run: |
47-
python -m pip install tox tox-gh-actions
48-
tox
49-
- name: Install native deps (macOS)
50-
if: runner.os == 'macOS' && (matrix.python-version != 'pypy-2.7' || matrix.python.version != 'pypy-3.8')
51-
run: |
52-
# it seems brew installed SQLite doesn't work with CPython somehow
53-
curl -s https://sqlite.org/2021/sqlite-autoconf-3370000.tar.gz | tar zxpf -
54-
cd sqlite-autoconf-3370000 && CPPFLAGS="-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ./configure --enable-debug && make && cd ..
55-
# env DYLD_PRINT_LIBRARIES=1 DYLD_LIBRARY_PATH=$PWD/sqlite-autoconf-3370000/.libs python -vc 'import sqlite3; print(sqlite3.connect(":memory:").execute("PRAGMA compile_options").fetchall())'
56-
- name: Test with pytest (macOS)
57-
if: runner.os == 'macOS'
58-
run: |
59-
pip install pytest faker igo-python "janome<0.4" tinysegmenter
60-
pip install -e .
61-
env DYLD_LIBRARY_PATH=$PWD/sqlite-autoconf-3370000/.libs python -m pytest -svra tests
62-
1+
name: Python package
2+
3+
on: [push]
4+
# push:
5+
# branches: [ master ]
6+
# pull_request:
7+
# branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.platform }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
platform: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-2.7", "pypy-3.9"]
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
- name: Install native deps (Linux)
27+
if: runner.os == 'Linux'
28+
run: |
29+
sudo apt install -y mecab libmecab-dev mecab-ipadic-utf8
30+
- name: Test with pytest (Windows & Py27/35)
31+
if: runner.os == 'Windows' && (matrix.python-version == '2.7' || matrix.python-version == '3.5')
32+
shell: bash
33+
run: |
34+
pip install pathlib
35+
curl -fsSL -o sqlite_dll.zip https://www.sqlite.org/2022/sqlite-dll-win64-x64-3380200.zip
36+
7z x sqlite_dll.zip sqlite3.dll
37+
cp -v $(python -c "import sys, pathlib; print([x for x in map(pathlib.Path, sys.path) if x.name == 'DLLs'][0]/'_sqlite3.pyd')") .
38+
pip install pytest faker igo-python "janome<0.4" tinysegmenter
39+
pip install -e .
40+
python -m pytest -svra tests
41+
- name: Test with tox
42+
if: runner.os == 'Linux' || (runner.os == 'Windows' && (matrix.python-version != '2.7' && matrix.python-version != '3.5'))
43+
run: |
44+
python -m pip install tox tox-gh-actions
45+
tox
46+
- name: Install native deps (macOS)
47+
if: runner.os == 'macOS' && (matrix.python-version != 'pypy-2.7' || matrix.python.version != 'pypy-3.9')
48+
run: |
49+
# it seems brew installed SQLite doesn't work with CPython somehow
50+
curl -s https://www.sqlite.org/2022/sqlite-autoconf-3380200.tar.gz | tar zxpf -
51+
cd sqlite-autoconf-3380200 && CPPFLAGS="-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ./configure --enable-debug && make && cd ..
52+
# env DYLD_PRINT_LIBRARIES=1 DYLD_LIBRARY_PATH=$PWD/sqlite-autoconf-3370000/.libs python -vc 'import sqlite3; print(sqlite3.connect(":memory:").execute("PRAGMA compile_options").fetchall())'
53+
- name: Test with pytest (macOS)
54+
if: runner.os == 'macOS'
55+
run: |
56+
pip install pytest faker igo-python "janome<0.4" tinysegmenter
57+
pip install -e .
58+
env DYLD_LIBRARY_PATH=$PWD/sqlite-autoconf-3380200/.libs python -m pytest -svra tests

0 commit comments

Comments
 (0)