2020-05-17 01:04:31 +00:00
|
|
|
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
|
|
|
|
|
|
name: Superscript Unit Tests
|
|
|
|
|
|
|
|
on:
|
2020-05-17 01:15:43 +00:00
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2020-05-17 01:04:31 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2020-05-17 01:09:29 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2020-05-17 01:15:43 +00:00
|
|
|
matrix:
|
2020-05-18 20:39:59 +00:00
|
|
|
python-version: [3.7, 3.8]
|
2020-05-17 01:04:31 +00:00
|
|
|
|
2020-05-18 20:39:59 +00:00
|
|
|
env:
|
|
|
|
working-directory: ./data-analysis/
|
2020-05-18 20:11:24 +00:00
|
|
|
|
2020-05-17 01:09:29 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2020-05-17 01:15:43 +00:00
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2020-05-17 01:09:29 +00:00
|
|
|
- name: Install dependencies
|
2020-05-17 01:15:43 +00:00
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2020-05-18 20:59:34 +00:00
|
|
|
pip install pytest
|
2020-05-17 01:15:43 +00:00
|
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
2020-05-18 20:39:59 +00:00
|
|
|
working-directory: ${{ env.working-directory }}
|
2020-05-17 01:09:29 +00:00
|
|
|
- name: Test with pytest
|
2020-05-17 01:15:43 +00:00
|
|
|
run: |
|
2020-05-18 21:14:16 +00:00
|
|
|
pytest
|
2020-05-18 20:39:59 +00:00
|
|
|
working-directory: ${{ env.working-directory }}
|