-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (62 loc) · 1.91 KB
/
python.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: python-lint-and-test
on: [ push ]
jobs:
python-check:
strategy:
fail-fast: false
matrix:
python-version: [ 3.11 ]
os:
- ubuntu-latest
# - macos-latest # at the moment bitsandbytes installation fails on macOS
# - windows-latest # utf-8 bugs on windows (https://github.com/pre-commit/pre-commit/issues/835)
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements.txt
- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install deps
run: |
python -m pip install --upgrade pip
make install_cpu
- name: Lint
run: make check
python-test:
needs:
- python-check
strategy:
fail-fast: false
matrix:
python-version: [ 3.11 ]
os:
- ubuntu-latest
# - macos-latest # at the moment bitsandbytes installation fails on macOS
# - windows-latest # utf-8 bugs on windows (https://github.com/pre-commit/pre-commit/issues/835)
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements.txt
- name: Install deps
run: |
python -m pip install --upgrade pip
make install_cpu
- name: Test
env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
run: make test