Skip to content

Commit

Permalink
Yaml file to ensure egg is built properly and all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
krzywon committed Aug 9, 2022
1 parent 92133cd commit ffbcbca
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/test.yml
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

0 comments on commit ffbcbca

Please sign in to comment.