-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (45 loc) · 1.46 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
name: Unit tests
on:
push:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.9]
name: clictagger CI ${{ matrix.os }} / ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: Install clictagger for UNIX
run: |
conda install icu>=68.1 pyicu>=2.6 Python~=3.9.0 pip
pip install .
if: ${{ matrix.os != 'windows-latest' }}
- name: Install clictagger for Windows
# NB: We can't use an enviroment for this, since we can't easily activate it in following steps
run: |
conda install icu>=68.1 Python~=3.9.0 pip
pip install https://github.com/mahlberg-lab/clictagger/raw/main/PyICU-2.6-cp39-cp39-win_amd64.whl
pip install .
if: ${{ matrix.os == 'windows-latest' }}
- name: Tests
run: |
pip install pytest
pytest clictagger tests
- name: Lint
run: |
pip install black
black --diff clictagger/ tests/
if: ${{ matrix.os == 'ubuntu-latest' }}
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}