Skip to content

Update git references to main #27

Update git references to main

Update git references to main #27

Workflow file for this run

name: Unittest
on:
push:
pull_request:
branches:
- develop
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
unit_tests:
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]
exclude:
# excludes macOS, until a fix can be found for process failure (#134)
- os: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Python Packages Install
run: |
python -m pip install --upgrade pip # upgrade pip
pip install wheel
pip install -q pytest pytest-runner pytest-cov coverage codacy-coverage
pip install coveralls
pip install .
- name: Test Windows
if: runner.os == 'Windows'
env:
MPLBACKEND: Agg
run: python setup.py test
- name: Test MacOS
if: runner.os == 'macOS'
run: python setup.py test
- name: Prep Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install jq curl # codacy requirement
sudo apt-get install xvfb
- name: Test Linux
if: runner.os == 'Linux'
run: |
xvfb-run python setup.py test
- name: Coveralls
env:
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: |
coveralls
coveralls:
name: Indicate completion to coveralls.io
needs: unit_tests
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}