-
Notifications
You must be signed in to change notification settings - Fork 24
122 lines (97 loc) · 2.89 KB
/
ci-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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: CI
on:
pull_request:
branches:
- develop
- master
- main
jobs:
test-full:
name: Full Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check Python Version
run: python --version
- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: |
brew tap sfarrens/sf
brew install bigmac libomp
- name: Install Package Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r develop.txt
python -m pip install twine
- name: Install PySAP
run: python -m pip install .
- name: Check PySAP Installation
run: |
python -c "import pysparse"
python -c "import pysap; print(pysap.info())"
- name: Run Tests
run: python -m pytest
- name: Save Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-test-results-${{ matrix.os }}-${{ matrix.python-version }}
path: pytest.xml
- name: Run Examples
continue-on-error: true
run: python pysap/test/test_examples.py
- name: Check Distribution
run: |
python setup.py sdist
twine check dist/*
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
test-basic:
name: Basic Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check Python Version
run: python --version
- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: |
brew tap sfarrens/sf
brew install bigmac libomp
- name: Install Package Dependencies
run: |
python --version
python -m pip install --upgrade pip
python -m pip install -r develop.txt
- name: Install PySAP
run: python -m pip install .
- name: Check PySAP Installation
run: |
python -c "import pysparse"
python -c "import pysap; print(pysap.info())"
- name: Run Tests
run: python -m pytest