36 lines
961 B
YAML
36 lines
961 B
YAML
name: Run All UnitTest
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
python-version: [3.7, 3.8]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: >
|
|
${{ runner.os }}-pip-
|
|
${{ hashFiles('**/requirements.txt') }}-
|
|
${{ hashFiles('**/requirements_test.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt -r requirements_test.txt
|
|
- name: Test with pytest
|
|
run: |
|
|
export PYTHONPATH=./
|
|
pytest --verbose --color=yes |