-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (56 loc) · 2.08 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
67
name: CI
on:
push:
branches:
- '**'
pull_request:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ["3.9"]
if: "!contains(github.event.head_commit.message, 'ci skip')"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up conda
# if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.6' }}
if: ${{ matrix.os != 'windows-latest' }}
uses: s-weigand/setup-conda@v1
with:
python-version: ${{ matrix.python-version}}
- name: Install dependencies for Unix
if: ${{ matrix.os != 'windows-latest' }}
run: |
python3 -m pip install -U scikit-build
python3 -m pip install -U awscli pip pytest coverage codecov setuptools
- name: Install dependencies for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
python3 -m pip install -U scikit-build --user
python3 -m pip install -U awscli pip pytest coverage codecov --user
- name: Build and install
run: python3 setup.py install
- name: Run unittest
env:
KMP_DUPLICATE_LIB_OK: "TRUE"
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: "YES"
run: |
python3 -m coverage run -m pytest -s --log-cli-level=DEBUG
echo "Done test. Start combining coverage report"
python3 -m coverage combine
echo "Done combine coverage report. Showing it out"
python3 -m coverage report
- name: Upload coverage report
run: codecov