-
Notifications
You must be signed in to change notification settings - Fork 165
57 lines (53 loc) · 1.76 KB
/
check-build.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
50
51
52
53
54
55
56
57
name: check-build
on:
push:
pull_request:
workflow_dispatch:
env:
PYTHONUTF8: "1"
# only run one at a time per branch
concurrency:
group: check-build-${{ github.ref }}
cancel-in-progress: true
jobs:
check-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: windows-latest
python-version: '3.12'
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
name: Install Mac OS requirements
run: brew install bash
- if: matrix.os == 'windows-latest'
name: Install Windows requirements
run: choco install wget unzip
- if: ${{ matrix.os != 'macos-14' && matrix.python-version != '3.12' }}
name: Install python dependencies
run: pip install ".[dev,ja,ko]"
- # mecab-ko doesn't support Apple Silicon or Python 3.12 yet.
if: ${{ matrix.os == 'macos-14' || matrix.python-version == '3.12' }}
name: Install Python dependencies on Apple Silicon or Python 3.12
run: |
pip install ".[dev,ja]"
echo "SKIP_MECAB_KO=true" >> $GITHUB_ENV
- name: Lint with Mypy
run: mypy sacrebleu scripts test
- name: Lint with Ruff
uses: chartboost/ruff-action@v1
- name: Python pytest test suite
run: python -m pytest
- name: CLI bash test suite
shell: bash
run: ./test.sh
- name: Build
run: python setup.py sdist bdist_wheel