-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.57 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "requirements/**"
- "src/bentoml/**"
- "src/bentoml_cli/**"
- "examples/**"
- "tests/**"
- "docs/**"
- ".github/actions/setup-repo/"
- ".github/actions/tests-cov/"
- "codecov.yml"
- "pyproject.toml"
- ".github/workflows/ci.yml"
- "scripts/ci/config.yml"
schedule:
- cron: "0 6 * * 1/2" # Every other day 6AM UTC
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
LINES: 200
COLUMNS: 200
BENTOML_DEBUG: True
BENTOML_DO_NOT_TRACK: True
PYTEST_PLUGINS: bentoml.testing.pytest.plugin
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
unit-tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
if: "!github.event.repository.fork" # Don't run on fork repository
name: python${{ matrix.python-version }}-unit-tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup CI
uses: ./.github/actions/setup-repo
with:
python-version: ${{ matrix.python-version }}