-
Notifications
You must be signed in to change notification settings - Fork 35
49 lines (48 loc) · 1.49 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Continuous Integration
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
name: "${{ matrix.python-version }}"
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python modules
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install dependencies
run: |
rm -rf .cache .eggs rust_fst/_ffi.py build *.egg-info
find ./ -name "__pycache__" -type d -print0 |xargs -0 rm -rf
find ./ -name "*.pyc" -type f -print0 |xargs -0 rm -rf
find ./ -name "*.so" -type f -print0 |xargs -0 rm -rf
pip install -U pip maturin
sudo apt install libffi-dev
- name: Compile
run: |
pip install -U --upgrade-strategy=eager .[test]
- name: Run Tests
run: |
pytest --cache-clear