-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (84 loc) · 2.12 KB
/
deploy_and_test.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- "*.md"
- "*.png"
- "*.svg"
- "docs/**"
- ".vscode/**"
pull_request:
branches: [ main ]
paths-ignore:
- "*.md"
- "*.png"
- "*.svg"
- "docs/**"
- ".vscode/**"
jobs:
build-and-test:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "macos-latest - Python 3.9",
os: macos-latest,
python-version: "3.9"
}
- {
name: "windows-latest - Python 3.9",
os: windows-latest,
python-version: "3.9"
}
- {
name: "ubuntu-latest - Python 3.9",
os: ubuntu-latest,
python-version: "3.9"
}
- {
name: "ubuntu-latest - Python 3.10",
os: ubuntu-latest,
python-version: "3.10"
}
- {
name: "ubuntu-latest - Python 3.11",
os: ubuntu-latest,
python-version: "3.11"
}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: segmantic_src
- name: Setup python ${{ matrix.config.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python-version }}
- name: Pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-{{ matrix.config.python-version }}
restore-keys: |
${{ runner.os }}-pip
- name: Pip install
run: |
python -m pip install --upgrade pip
pip install -e segmantic_src
- name: Pip install dev
run: |
python -m pip install --upgrade pip
pip install -e "segmantic_src[dev]"
- name: Test
working-directory: segmantic_src
run: pytest --cov segmantic --cov-report=xml --cov-config=.coveragerc
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
flags: unittests #optional
working-directory: segmantic_src