-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Yaml file to ensure egg is built properly and all tests pass
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Tests | ||
|
||
on: | ||
[push, pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
unit-test: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
python-version: [3.7, 3.8, 3.9] | ||
fail-fast: false | ||
|
||
steps: | ||
|
||
- name: Obtain SasData source from git | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
### Caching of pip downloads and local wheel builds | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Obtain pip cache (Linux) | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/test.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-${{ matrix.python-version }}- | ||
${{ runner.os }}-pip- | ||
### Installation of build-dependencies | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel setuptools | ||
python -m pip install numpy lxml h5py | ||
### Actual building/testing of sasdata | ||
|
||
- name: Build sasdata | ||
run: | | ||
# BUILD SASDATA | ||
python setup.py clean | ||
python setup.py build | ||
python -m pip install . | ||
- name: Test with pytest | ||
env: | ||
PYOPENCL_COMPILER_OUTPUT: 1 | ||
run: | | ||
python -m pytest -v -s test |