-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (42 loc) · 1.15 KB
/
build.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
name: build
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest] # macos-11, ubuntu-20.04, windows-2022
python-version: ['3.8', '3.9', '3.10']
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Before install
run: |
python -m pip install --upgrade pip
pip install coverage flake8 pytest wheel
- name: Unix-like Install
run: |
python setup.py bdist_wheel
pip install dist/*.whl
if: runner.os != 'Windows'
- name: Windows Install
run: |
pip install .
if: runner.os == 'Windows'
- name: Lint with flake8
run: |
flake8 . --count
- name: Test with pytest and generate coverage report
run: |
coverage run -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3