This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
66 lines (56 loc) · 1.51 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
64
65
66
name: Bentoctl-CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# schedule:
# - cron '0 2 * * *'
env:
BENTOCTL_DO_NOT_TRACK: True
BENTOML_DO_NOT_TRACK: True
jobs:
lint_and_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: '3.10'
cache: 'true'
- name: Install test dependencies
run: pdm install
- name: Run linting script
run: pdm lint
unit_tests:
name: ${{ matrix.os }} Python ${{ matrix.python-version }} Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.8', '3.11' ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup python
uses: pdm-project/setup-pdm@v3
with :
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'true'
- name: Install test dependencies
run: pdm install
- name: Run unit-tests
run: pdm test
shell: bash
- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v2
with:
name: codecov-${{ matrix.os }}-python${{ matrix.python-version }}
fail_ci_if_error: true
flags: unit-tests
directory: ./
files: ./unit.xml
verbose: true