-
Notifications
You must be signed in to change notification settings - Fork 1
187 lines (183 loc) · 5.16 KB
/
test.yml
File metadata and controls
187 lines (183 loc) · 5.16 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: Tests
on:
schedule:
# run every Sunday at 10:13 am UTC (3:13 am PT)
- cron: '13 10 * * 0'
push:
branches:
- master
tags:
- "v*"
pull_request:
workflow_dispatch:
jobs:
# base-tests:
# name: py${{ matrix.python }} ${{ matrix.name-modifier }} - on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
#
# strategy:
# fail-fast: false
# matrix:
# include:
# # mark default
# - python: '3.10'
# os: ubuntu-latest
# do-coverage: false
# name-modifier: ''
#
# # mark case for coverage reporting
# - python: '3.7'
# os: ubuntu-latest
# do-coverage: true
# name-modifier: 'with Coverage'
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python }}
# - name: Install 'bapsflib' dependencies
# run: python -m pip install -r requirements/tests.txt
# - name: Run tests ${{ matrix.name-modifier }}
# run: |
# if ${{ matrix.do-coverage }}; then
# coverage run -m unittest discover
# else
# python -m unittest discover
# fi
# shell: bash
# - name: Report coverage
# if: ${{ matrix.do-coverage && !failure() }}
# uses: codecov/codecov-action@v3.1.4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: .coverage
# fail_ci_if_error: true
#
# tests:
# needs: base-tests
# name: py${{ matrix.python }} - on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
#
# strategy:
# fail-fast: false
# matrix:
# python: ['3.7', '3.8', '3.9', '3.10']
# os: [ubuntu-latest, macos-latest, windows-latest]
#
# exclude:
# # these were done in base-tests
# - python: '3.10'
# os: ubuntu-latest
# - python: '3.7'
# os: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python }}
# - name: Install 'bapsflib' dependencies
# run: python -m pip install -r requirements/tests.txt
# - name: Run tests
# run: |
# python -m unittest discover
# shell: bash
#
# test-mins:
# # test min versions of key dependencies
# needs: tests
# name: Min Vers | py-${{ matrix.python }} | ${{ matrix.spec-name }}
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: true
# matrix:
# include:
# - spec-name: h5py v3.0
# min-install: h5py==3.0
# python: '3.7'
#
# - spec-name: h5py v3.0 numpy v1.20
# min-install: h5py==3.0 numpy==1.20
# python: '3.7'
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python }}
# - name: Install 'bapsflib' dependencies
# run: |
# python -m pip install -r requirements/tests.txt ${{ matrix.min-install }}
# - name: Run tests
# run: python -m unittest discover
import-eigsolver:
name: Importing bapsf_eigsolver
# needs: base-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install 'bapsf_eigsolver' dependencies
run: |
python -m pip install -r requirements/install.txt
- name: Import 'bapsf_eigsolver'
run: |
python -c 'import bapsf_eigsolver'
build-bapsf_eigsolver:
name: Packaging
runs-on: ubuntu-latest
needs:
# - test-mins
- import-eigsolver
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install requirements
run: |
pip install --progress-bar off --upgrade pip
pip install --progress-bar off -r requirements/install.txt twine
- name: Build a binary wheel
run: |
python setup.py bdist_wheel
- name: Build a source tarball
run: |
python setup.py sdist
- name: Twine check
run: |
twine check dist/*
- name: Install bapsf_eigsolver in all variants
run: |
pip install --progress-bar off .[developer]
pip install --progress-bar off -e .[developer]
python setup.py develop