-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (66 loc) · 1.92 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
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
name: Build
on:
push:
paths-ignore:
- '**.md'
- '**.txt'
- 'LICENSE'
- '.gitignore'
- 'rnxcmp/front-end-tools/**'
- '.github/workflows/publish.yml'
pull_request:
paths-ignore:
- '**.md'
- '**.txt'
- 'LICENSE'
- '.gitignore'
- 'rnxcmp/front-end-tools/**'
jobs:
build:
name: ${{ matrix.install-mode }} | ${{ matrix.os }} | Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.11']
install-mode: ['setup.py', 'sdist', 'wheel']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: build and install
if: ${{ matrix.install-mode == 'setup.py' }}
run: |
python setup.py build
pip install .
- name: sdist install
if: ${{ matrix.install-mode == 'sdist' }}
shell: bash
run: |
python setup.py sdist
ls dist/
pip install dist/hatanaka-*.tar.gz
- name: wheel install
if: ${{ matrix.install-mode == 'wheel' }}
shell: bash
run: |
python -m pip install wheel
python setup.py bdist_wheel
ls dist/
pip install dist/hatanaka-*.whl
- name: Test
run: |
mkdir tmp
cd tmp
python -m pip install pytest pytest-cov
pytest --pyargs hatanaka -v --color=yes --cov-report=xml --cov=hatanaka.hatanaka --cov=hatanaka.general_compression --cov=hatanaka.cli
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
with:
env_vars: OS,PYTHON
fail_ci_if_error: false